comparison http.c @ 6080:c7ddd67739a6 libavformat

http: Set http_code to 200 when doing a POST This avoids reading and comparing uninitialized memory.
author mstorsjo
date Fri, 04 Jun 2010 06:35:12 +0000
parents 7fdda2416684
children 447fe3440991
comparison
equal deleted inserted replaced
6079:4518f83661f4 6080:c7ddd67739a6
289 s->off = 0; 289 s->off = 0;
290 s->filesize = -1; 290 s->filesize = -1;
291 if (post) { 291 if (post) {
292 /* always use chunked encoding for upload data */ 292 /* always use chunked encoding for upload data */
293 s->chunksize = 0; 293 s->chunksize = 0;
294 /* Pretend that it did work. We didn't read any header yet, since
295 * we've still to send the POST data, but the code calling this
296 * function will check http_code after we return. */
297 s->http_code = 200;
294 return 0; 298 return 0;
295 } 299 }
296 300
297 /* wait for header */ 301 /* wait for header */
298 for(;;) { 302 for(;;) {