AP_SetStatusCode

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

AP_SetStatusCode

Postby Otto » Mon Feb 26, 2024 4:40 am

Hello friends,
I find AP_SetContentType("application/json") in apache.prg as EXTERN but I can't find

AP_SetStatusCode(200) and AP_AddHeader("Another-Header", "HeaderValue").
Are these in another part of sourcecode?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Re: AP_SetStatusCode

Postby Antonio Linares » Mon Feb 26, 2024 8:06 am

Dear Otto,

200 is returned by defaut by Apache. If you want to return a different value then you have to use ErrorLevel( nValue ) in example: ErrorLevel( 408 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: AP_SetStatusCode

Postby Antonio Linares » Mon Feb 26, 2024 11:50 am

Dear Otto,

> AP_AddHeader("Another-Header", "HeaderValue")

Do you mean in headers or out headers ? I guess out headers, if so:

AP_HeadersOutSet( cKey, cValue )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 1 guest