aboutsummaryrefslogtreecommitdiff
path: root/src/microspdy/applicationlayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microspdy/applicationlayer.c')
-rw-r--r--src/microspdy/applicationlayer.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/microspdy/applicationlayer.c b/src/microspdy/applicationlayer.c
index efcf2b3d..17a00289 100644
--- a/src/microspdy/applicationlayer.c
+++ b/src/microspdy/applicationlayer.c
@@ -157,7 +157,7 @@ spdy_handler_new_stream (void *cls,
157 } 157 }
158 158
159 //ignore everything but GET 159 //ignore everything but GET
160 if(strcasecmp("GET",method)) 160 if(strcasecmp("GET",method) && strcasecmp("POST",method))
161 { 161 {
162 SPDYF_DEBUG("received method '%s'", method); 162 SPDYF_DEBUG("received method '%s'", method);
163 static char * html = "Method not implemented. libmicrospdy supports now only GET."; 163 static char * html = "Method not implemented. libmicrospdy supports now only GET.";
@@ -187,7 +187,10 @@ spdy_handler_new_stream (void *cls,
187 version, 187 version,
188 host, 188 host,
189 scheme, 189 scheme,
190 headers); 190 headers,
191 !stream->is_in_closed);
192
193 stream->cls = request;
191 194
192 return SPDY_YES; 195 return SPDY_YES;
193 196
@@ -200,6 +203,21 @@ spdy_handler_new_stream (void *cls,
200 203
201 204
202/** 205/**
206 * TODO
207 */
208static int
209spdy_handler_new_data (void * cls,
210 struct SPDYF_Stream *stream,
211 const void * buf,
212 size_t size,
213 bool more)
214{
215 return stream->session->daemon->received_data_cb(cls, stream->cls, buf, size, more);
216}
217
218
219
220/**
203 * Callback to be called when the response queue object was handled and 221 * Callback to be called when the response queue object was handled and
204 * the data was already sent or discarded. 222 * the data was already sent or discarded.
205 * 223 *
@@ -332,7 +350,7 @@ SPDY_start_daemon (uint16_t port,
332 SPDY_NewSessionCallback nscb, 350 SPDY_NewSessionCallback nscb,
333 SPDY_SessionClosedCallback sccb, 351 SPDY_SessionClosedCallback sccb,
334 SPDY_NewRequestCallback nrcb, 352 SPDY_NewRequestCallback nrcb,
335 SPDY_NewPOSTDataCallback npdcb, 353 SPDY_NewDataCallback npdcb,
336 void * cls, 354 void * cls,
337 ...) 355 ...)
338{ 356{
@@ -367,6 +385,7 @@ SPDY_start_daemon (uint16_t port,
367 nrcb, 385 nrcb,
368 npdcb, 386 npdcb,
369 &spdy_handler_new_stream, 387 &spdy_handler_new_stream,
388 &spdy_handler_new_data,
370 cls, 389 cls,
371 NULL, 390 NULL,
372 valist 391 valist