FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour AP_SetStatusCode
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
AP_SetStatusCode
Posted: Mon Feb 26, 2024 04: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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AP_SetStatusCode
Posted: Mon Feb 26, 2024 08: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: AP_SetStatusCode
Posted: 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

Continue the discussion