[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Bug in example.
From: |
Timothy Schaeffer |
Subject: |
[libmicrohttpd] Bug in example. |
Date: |
Thu, 26 Feb 2009 14:02:00 -0500 |
There is a bug in fileserver_example.c. I had copied this as a template for my
own code
and ran into this bug.
I didn't notice this until a small tcl test client program I modified from the
web was sending
HTTP/1.0 request to my server, causing it to SEGFAULT. HTTP/1.1 requests
worked fine. When I wrote
in code to reject 1.0 requests, the version parm was blank. Then I noticed
that the argument
order was wrong.
I do not yet know if the SEGFAULT was caused by my code, the MHD library, or
the avcodec library
(I'm creating a video stream server over HTTP as part of a larger application),
but rejecting 1.0 requests
seems to fix it.
The library is great, BTW. Thanks.
Tim S.
Index: src/examples/fileserver_example.c
===================================================================
--- src/examples/fileserver_example.c (revision 8292)
+++ src/examples/fileserver_example.c (working copy)
@@ -43,8 +43,8 @@
struct MHD_Connection *connection,
const char *url,
const char *method,
- const char *upload_data,
- const char *version, unsigned int *upload_data_size, void **ptr)
+ const char *version,
+ const char *upload_data, unsigned int *upload_data_size, void **ptr)
{
static int aptr;
struct MHD_Response *response;
Index: src/examples/fileserver_example_external_select.c
===================================================================
--- src/examples/fileserver_example_external_select.c (revision 8292)
+++ src/examples/fileserver_example_external_select.c (working copy)
@@ -43,8 +43,8 @@
struct MHD_Connection *connection,
const char *url,
const char *method,
- const char *upload_data,
- const char *version, unsigned int *upload_data_size, void **ptr)
+ const char *version,
+ const char *upload_data, unsigned int *upload_data_size, void **ptr)
{
static int aptr;
struct MHD_Response *response;
Index: src/examples/https_fileserver_example.c
===================================================================
--- src/examples/https_fileserver_example.c (revision 8292)
+++ src/examples/https_fileserver_example.c (working copy)
@@ -111,8 +111,8 @@
struct MHD_Connection *connection,
const char *url,
const char *method,
- const char *upload_data,
- const char *version, size_t *upload_data_size, void **ptr)
+ const char *version,
+ const char *upload_data, size_t *upload_data_size, void **ptr)
{
static int aptr;
struct MHD_Response *response;
- [libmicrohttpd] Bug in example.,
Timothy Schaeffer <=