]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http server: add more return code names to http_rc2str(), fixes #3703
authorJaroslav Kysela <perex@perex.cz>
Fri, 8 Apr 2016 17:09:28 +0000 (19:09 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Apr 2016 17:09:28 +0000 (19:09 +0200)
src/http.c

index d44fd78f17c1b5cbac68871db5be0a9c23c09867..fd07efb26e03c2a72a963bb1b2e642cc6d7bee55 100644 (file)
@@ -194,17 +194,20 @@ static const char *
 http_rc2str(int code)
 {
   switch(code) {
-  case HTTP_STATUS_OK:              return "OK";
-  case HTTP_STATUS_PARTIAL_CONTENT: return "Partial Content";
-  case HTTP_STATUS_FOUND:           return "Found";
-  case HTTP_STATUS_BAD_REQUEST:     return "Bad Request";
-  case HTTP_STATUS_UNAUTHORIZED:    return "Unauthorized";
-  case HTTP_STATUS_NOT_FOUND:       return "Not Found";
-  case HTTP_STATUS_UNSUPPORTED:     return "Unsupported Media Type";
-  case HTTP_STATUS_BANDWIDTH:       return "Not Enough Bandwidth";
-  case HTTP_STATUS_BAD_SESSION:     return "Session Not Found";
-  case HTTP_STATUS_HTTP_VERSION:    return "HTTP/RTSP Version Not Supported";
-  default:
+  case HTTP_STATUS_OK:              /* 200 */ return "OK";
+  case HTTP_STATUS_PARTIAL_CONTENT: /* 206 */ return "Partial Content";
+  case HTTP_STATUS_FOUND:           /* 302 */ return "Found";
+  case HTTP_STATUS_BAD_REQUEST:     /* 400 */ return "Bad Request";
+  case HTTP_STATUS_UNAUTHORIZED:    /* 401 */ return "Unauthorized";
+  case HTTP_STATUS_FORBIDDEN:       /* 403 */ return "Forbidden";
+  case HTTP_STATUS_NOT_FOUND:       /* 404 */ return "Not Found";
+  case HTTP_STATUS_NOT_ALLOWED:     /* 405 */ return "Method Not Allowed";
+  case HTTP_STATUS_UNSUPPORTED:     /* 415 */ return "Unsupported Media Type";
+  case HTTP_STATUS_BANDWIDTH:       /* 453 */ return "Not Enough Bandwidth";
+  case HTTP_STATUS_BAD_SESSION:     /* 454 */ return "Session Not Found";
+  case HTTP_STATUS_INTERNAL:        /* 500 */ return "Internal Server Error";
+  case HTTP_STATUS_HTTP_VERSION:    /* 505 */ return "HTTP/RTSP Version Not Supported";
+default:
     return "Unknown Code";
     break;
   }