[Mplayer-cvslog] CVS: main/libmpdemux http.c,1.10,1.11
Bertrand Baudet
bertrand at mplayer.dev.hu
Sat Feb 23 08:31:54 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv10058
Modified Files:
http.c
Log Message:
Fixed the http response parser when the http header only has the HTTP
answer and no field.
Fixed some compiler warnings.
Index: http.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/http.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- http.c 23 Jan 2002 08:46:22 -0000 1.10
+++ http.c 23 Feb 2002 07:31:45 -0000 1.11
@@ -9,6 +9,7 @@
#include <string.h>
#include "http.h"
+#include "url.h"
HTTP_header_t *
http_new_header() {
@@ -146,6 +147,7 @@
ptr = hdr_ptr;
while( *ptr!='\r' && *ptr!='\n' ) ptr++;
len = ptr-hdr_ptr;
+ if( len==0 ) break;
field = (char*)realloc(field, len+1);
if( field==NULL ) {
printf("Memory allocation failed\n");
@@ -256,7 +258,6 @@
char *
http_get_next_field( HTTP_header_t *http_hdr ) {
char *ptr;
- int i;
HTTP_field_t *field;
if( http_hdr==NULL ) return NULL;
More information about the MPlayer-cvslog
mailing list