ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Search Repo:
small update to python binding
Ryan Dahl (author)
Thu Mar 13 05:00:52 -0700 2008
commit  4676c11c4e38bf25e5a231af0bf13e99f2d70bb5
tree    b9683dfb216999a31812661ac9abcffbbce330ed
parent  78c364764b4e2f57df044c73253c14c74058825c
...
511
512
513
 
 
514
515
516
...
511
512
513
514
515
516
517
518
0
@@ -511,6 +511,8 @@
0
 {
0
   assert(client->in_use);
0
   client->in_use = FALSE;
0
+ if(client->written == client->response_buffer->len)
0
+ ebb_client_close(client);
0
 }
0
 
0
 
...
44
45
46
 
 
 
 
 
 
 
47
48
49
...
58
59
60
 
61
62
63
...
115
116
117
118
119
120
121
...
186
187
188
189
190
191
192
...
197
198
199
200
 
201
202
203
...
248
249
250
251
 
 
252
253
254
...
44
45
46
47
48
49
50
51
52
53
54
55
56
...
65
66
67
68
69
70
71
...
123
124
125
 
126
127
128
...
193
194
195
 
196
197
198
...
203
204
205
 
206
207
208
209
...
254
255
256
 
257
258
259
260
261
0
@@ -44,6 +44,13 @@
0
 static PyObject *
0
 py_start_response(py_client *self, PyObject *args, PyObject *kw);
0
 
0
+static void py_client_dealloc(PyObject *obj)
0
+{
0
+ py_client *self = (py_client*) obj;
0
+ ebb_client_release(self->client);
0
+ obj->ob_type->tp_free(obj);
0
+ printf("dealloc called!\n");
0
+}
0
 
0
 static PyMethodDef client_methods[] =
0
   { {"start_response" , (PyCFunction)py_start_response, METH_VARARGS, NULL }
0
@@ -58,6 +65,7 @@
0
   , tp_basicsize: sizeof(py_client)
0
   , tp_flags: Py_TPFLAGS_DEFAULT
0
   , tp_methods: client_methods
0
+ , tp_dealloc: py_client_dealloc
0
   };
0
 
0
 static PyObject *
0
@@ -115,7 +123,6 @@
0
     case EBB_REQUEST_PATH: f = global_request_path; break;
0
     case EBB_QUERY_STRING: f = global_query_string; break;
0
     case EBB_HTTP_VERSION: f = global_http_version; break;
0
- case EBB_SERVER_NAME: f = global_server_name; break;
0
     case EBB_SERVER_PORT: f = global_server_port; break;
0
     case EBB_CONTENT_LENGTH: f = global_content_length; break;
0
     default: assert(FALSE);
0
@@ -186,7 +193,6 @@
0
   Py_DECREF(arglist);
0
   Py_DECREF(environ);
0
   
0
-
0
   PyObject *iterator = PyObject_GetIter(body);
0
   PyObject *body_item;
0
   while (body_item = PyIter_Next(iterator)) {
0
@@ -197,7 +203,7 @@
0
     Py_DECREF(body_item);
0
   }
0
   
0
- ebb_client_finished(client);
0
+ ebb_client_begin_transmission(client);
0
   
0
   Py_DECREF(pclient);
0
 }
0
@@ -248,7 +254,8 @@
0
   
0
   base_env = PyDict_New();
0
   PyDict_SetStringString(base_env, "SCRIPT_NAME", "");
0
- PyDict_SetStringString(base_env, "SERVER_SOFTWARE", "Ebb 0.0.4");
0
+ PyDict_SetStringString(base_env, "SERVER_SOFTWARE", EBB_VERSION);
0
+ PyDict_SetStringString(base_env, "SERVER_NAME", "0.0.0.0");
0
   PyDict_SetStringString(base_env, "SERVER_PROTOCOL", "HTTP/1.1");
0
   PyDict_SetStringString(base_env, "wsgi.url_scheme", "http");
0
   PyDict_SetItemString(base_env, "wsgi.multithread", Py_False);

Comments

    No one has commented yet.