Mercurial > libavformat.hg
comparison http.c @ 1881:a7abdfdb5ed7 libavformat
handle http error codes
| author | alex |
|---|---|
| date | Tue, 06 Mar 2007 13:38:41 +0000 |
| parents | c704f9d730bf |
| children | 663139d56669 |
comparison
equal
deleted
inserted
replaced
| 1880:54f814d6708c | 1881:a7abdfdb5ed7 |
|---|---|
| 167 p++; | 167 p++; |
| 168 s->http_code = strtol(p, NULL, 10); | 168 s->http_code = strtol(p, NULL, 10); |
| 169 #ifdef DEBUG | 169 #ifdef DEBUG |
| 170 printf("http_code=%d\n", s->http_code); | 170 printf("http_code=%d\n", s->http_code); |
| 171 #endif | 171 #endif |
| 172 /* error codes are 4xx and 5xx */ | |
| 173 if (s->http_code >= 400 && s->http_code < 600) | |
| 174 return -1; | |
| 172 } else { | 175 } else { |
| 173 while (*p != '\0' && *p != ':') | 176 while (*p != '\0' && *p != ':') |
| 174 p++; | 177 p++; |
| 175 if (*p != ':') | 178 if (*p != ':') |
| 176 return 1; | 179 return 1; |
