public
Description: A cross-platform web server that's scripted with Nu.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nunja.git
Added post headers.
timburks (author)
Sun Jun 01 17:40:40 -0700 2008
commit  c8bb0581af61ec742ecbad5ab741dc9f5b34a191
tree    640cb233867eea59ba26c4440758fe8582f37140
parent  ad036c71fe188bcc477effa313f6e8d8173dabf8
...
384
385
386
 
 
387
388
389
...
384
385
386
387
388
389
390
391
0
@@ -384,6 +384,8 @@ void nunja_http_request_done(struct evhttp_request *req, void *arg)
0
     // make the request
0
     struct evhttp_request *req = evhttp_request_new(nunja_http_request_done, block);
0
     evhttp_add_header(req->output_headers, "Host", [host cStringUsingEncoding:NSUTF8StringEncoding]);
0
+ evhttp_add_header(req->output_headers, "Content-Length", [[NSString stringWithFormat:@"%d", [data length]] cStringUsingEncoding:NSUTF8StringEncoding]);
0
+ evhttp_add_header(req->output_headers, "Content-Type", "application/x-www-form-urlencoded");
0
     evbuffer_add(req->output_buffer, [data bytes], [data length]);
0
 
0
     // give ownership of the request to the connection

Comments

    No one has commented yet.