diff options
| author | Sascha Schumann <sas@php.net> | 2002-07-03 10:42:31 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2002-07-03 10:42:31 +0000 |
| commit | 9c876ea01ad806ae6e345c5dc0cf252c0ebe8864 (patch) | |
| tree | 60c5f992ca4a366896c4166747336f79ca7e9164 /sapi/webjames | |
| parent | c73733c59acef49b86af5996cb0ec12b970a7759 (diff) | |
| download | php-git-9c876ea01ad806ae6e345c5dc0cf252c0ebe8864.tar.gz | |
Add sapi_header_op interface which supersedes the sapi_add_header and _ex
calls.
Revert the change to the sapi_add_header_ex interface.
Fix various bugs:
1. header("HTTP/1.0 306 foo");
header("Location: absolute-uri");
did not work in combination with several SAPI modules, because
http_status_line was never properly reset. And thus, all SAPI
modules which looked at http_status_line ignored the changed
http_response_code.
2. The CGI SAPI did not send out the HTTP status line at all, if
http_status_line had not been set explicitly by calling
header("HTTP/1.0 200 foo");
Diffstat (limited to 'sapi/webjames')
| -rw-r--r-- | sapi/webjames/webjames.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sapi/webjames/webjames.c b/sapi/webjames/webjames.c index 1aba413dee..3bea3457e4 100644 --- a/sapi/webjames/webjames.c +++ b/sapi/webjames/webjames.c @@ -54,22 +54,6 @@ static int sapi_webjames_ub_write(const char *str, uint str_length TSRMLS_DC) return bytes; } -static int sapi_webjames_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) -/*send the HTTP response line*/ -{ - char buf[256]; - - if (WG(conn)->flags.outputheaders) { - if (!SG(sapi_headers).http_status_line) { - int code=SG(sapi_headers).http_response_code; - snprintf(buf, 255, "HTTP/1.0 %d %s\r\n", code, code==200 ? "OK" : code==302 ? "Moved temporarily" : "Something"); - webjames_writestring(WG(conn), buf); - } - } - - return SAPI_HEADER_DO_SEND; -} - static void sapi_webjames_send_header(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC) /*send an HTTP header*/ { @@ -286,7 +270,7 @@ static sapi_module_struct sapi_module = { php_error, /* error handler */ NULL, /* header handler */ - sapi_webjames_send_headers, /* send headers handler */ + NULL, /* send headers handler */ sapi_webjames_send_header, /* send header handler */ sapi_webjames_read_post, /* read POST data */ sapi_webjames_read_cookies, /* read Cookies */ |
