File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ enum HttpError {
29
29
HTTP_ERROR_404_FILE_NOT_FOUND = 4
30
30
};
31
31
32
+ #ifndef UWS_HTTPRESPONSE_NO_WRITEMARK
33
+
32
34
/* Returned parser errors match this LUT. */
33
35
static const std::string_view httpErrorResponses[] = {
34
36
" " , /* Zeroth place is no error so don't use it */
@@ -37,6 +39,18 @@ static const std::string_view httpErrorResponses[] = {
37
39
" HTTP/1.1 400 Bad Request\r\n\r\n <h1>Bad Request</h1><hr><i>uWebSockets/20 Server</i>" ,
38
40
" HTTP/1.1 404 File Not Found\r\n\r\n <h1>File Not Found</h1><hr><i>uWebSockets/20 Server</i>"
39
41
};
42
+
43
+ #else
44
+ /* Anonymized pages */
45
+ static const std::string_view httpErrorResponses[] = {
46
+ " " , /* Zeroth place is no error so don't use it */
47
+ " HTTP/1.1 505 HTTP Version Not Supported\r\n\r\n " ,
48
+ " HTTP/1.1 431 Request Header Fields Too Large\r\n\r\n " ,
49
+ " HTTP/1.1 400 Bad Request\r\n\r\n " ,
50
+ " HTTP/1.1 404 File Not Found\r\n\r\n "
51
+ };
52
+ #endif
53
+
40
54
}
41
55
42
56
#endif
You can’t perform that action at this time.
0 commit comments