cvs: /php4 aolserver.c
| From: | Sascha Schumann | Date: | Sat, 25 Sep 1999 16:51:19 +0000 |
| Subject: | cvs: /php4 aolserver.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4915@lists.php.net to get a copy of this message | ||
sas Sat Sep 25 12:51:19 1999 EDT
Modified files:
/php4 aolserver.c
Log:
* cleanup
* make cookies work
Index: php4/aolserver.c
diff -u php4/aolserver.c:1.4 php4/aolserver.c:1.5
--- php4/aolserver.c:1.4 Sat Sep 25 12:06:55 1999
+++ php4/aolserver.c Sat Sep 25 12:51:18 1999
@@ -16,9 +16,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aolserver.c,v 1.4 1999/09/25 16:06:55 sas Exp $ */
+/* $Id: aolserver.c,v 1.5 1999/09/25 16:51:18 sas Exp $ */
+/* conflict between PHP and aolserver */
+#define Debug php_Debug
#include "php.h"
+#undef Debug
#ifdef HAVE_AOLSERVER
@@ -27,20 +30,10 @@
#include "SAPI.h"
#include "main.h"
-/* conflict between PHP and aolserver */
-#define Debug DEBUG_UNUSED
#include "ns.h"
-#undef Debug
#include "php_version.h"
-#if 0
-#define HERE \
- Ns_Log(Notice, "in %s:%d", __FUNCTION__, __LINE__);
-#else
-#define HERE
-#endif
-
int Ns_ModuleVersion = 1;
typedef struct {
@@ -60,7 +53,6 @@
php_ns_context *ctx;
SLS_FETCH();
- HERE;
ctx = (php_ns_context *) SG(server_context);
Ns_DStringInit(&dstr);
@@ -129,8 +121,17 @@
static char *
php_ns_sapi_read_cookies(SLS_D)
{
- HERE;
- return NULL;
+ Ns_Set *headers;
+ char *http_cookie;
+ php_ns_context *ctx = (php_ns_context *) SG(server_context);
+
+ headers = Ns_ConnHeaders(conn);
+
+ if(headers) {
+ http_cookie = Ns_SetGet(headers, "HTTP_COOKIE");
+ }
+
+ return http_cookie;
}
static sapi_module_struct sapi_module = {
@@ -161,8 +162,6 @@
ELS_FETCH();
PLS_FETCH();
- HERE;
-
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = SG(request_info).path_translated;
@@ -179,7 +178,6 @@
char *server;
Ns_DString ds;
char *root;
- HERE;
server = Ns_ConnServer(ctx->conn);
@@ -204,8 +202,6 @@
static void
php_ns_request_dtor(php_ns_context *ctx SLS_DC)
{
- HERE;
-
free(SG(request_info).path_translated);
Ns_DStringFree(&ctx->content_type);
}
@@ -217,7 +213,6 @@
int status = NS_OK;
SLS_FETCH();
- HERE;
ctx->conn = conn;
php_ns_request_ctor(ctx SLS_CC);
@@ -279,7 +274,6 @@
{
php_ns_context *ctx = (php_ns_context *) context;
- HERE;
ctx->sapi_module->shutdown(ctx->sapi_module);
sapi_shutdown();
tsrm_shutdown();
@@ -288,7 +282,6 @@
free(ctx->ns_server);
free(ctx);
}
-
int Ns_ModuleInit(char *server, char *module)
{