Update of /cvsroot/mplayer/main/libmpdemux In directory mplayer:/var/tmp.root/cvs-serv8035/libmpdemux Modified Files: http.c Log Message: Modified the output of the http_debug function. Fixed a bug in the reading of the "reason answer" Index: http.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/http.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http.c 27 Dec 2001 02:02:03 -0000 1.9 +++ http.c 23 Jan 2002 08:46:22 -0000 1.10 @@ -124,6 +124,9 @@ return -1; } strncpy( http_hdr->reason_phrase, hdr_ptr, len ); + if( http_hdr->reason_phrase[len-1]=='\r' ) { + len--; + } http_hdr->reason_phrase[len]='\0'; // Set the position of the header separator: \r\n\r\n @@ -329,12 +332,14 @@ int i = 0; if( http_hdr==NULL ) return; - printf("protocol: %s\n", http_hdr->protocol ); - printf("http minor version: %d\n", http_hdr->http_minor_version ); - printf("uri: %s\n", http_hdr->uri ); - printf("method: %s\n", http_hdr->method ); - printf("status code: %d\n", http_hdr->status_code ); - printf("reason phrase: %s\n", http_hdr->reason_phrase ); + printf("--- HTTP DEBUG HEADER --- START ---\n"); + printf("protocol: [%s]\n", http_hdr->protocol ); + printf("http minor version: [%d]\n", http_hdr->http_minor_version ); + printf("uri: [%s]\n", http_hdr->uri ); + printf("method: [%s]\n", http_hdr->method ); + printf("status code: [%d]\n", http_hdr->status_code ); + printf("reason phrase: [%s]\n", http_hdr->reason_phrase ); + printf("body size: [%d]\n", http_hdr->body_size ); printf("Fields:\n"); field = http_hdr->first_field; @@ -342,4 +347,5 @@ printf(" %d - %s\n", i++, field->field_name ); field = field->next; } + printf("--- HTTP DEBUG HEADER --- END ---\n"); }
participants (1)
-
Bertrand Baudet