diff options
Diffstat (limited to 'doc/libmicrohttpd.texi')
-rw-r--r-- | doc/libmicrohttpd.texi | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi index b61c94ff..2ecb64e6 100644 --- a/doc/libmicrohttpd.texi +++ b/doc/libmicrohttpd.texi | |||
@@ -1144,6 +1144,33 @@ Only respond in conservative HTTP 1.0-mode. In particular, | |||
1144 | do not (automatically) sent "Connection" headers and always | 1144 | do not (automatically) sent "Connection" headers and always |
1145 | close the connection after generating the response. | 1145 | close the connection after generating the response. |
1146 | 1146 | ||
1147 | By default, MHD will respond using the same HTTP version which | ||
1148 | was set in the request. You can also set the | ||
1149 | @code{MHD_RF_HTTP_VERSION_1_0_RESPONSE} flag to force version 1.0 | ||
1150 | in the response. | ||
1151 | |||
1152 | @item MHD_RF_HTTP_VERSION_1_0_RESPONSE | ||
1153 | Only respond in HTTP 1.0-mode. Contrary to the | ||
1154 | @code{MHD_RF_HTTP_VERSION_1_0_ONLY} flag, the response's HTTP version will | ||
1155 | always be set to 1.0 and ``Connection'' headers are still supported. | ||
1156 | |||
1157 | You can even combine this option with MHD_RF_HTTP_VERSION_1_0_ONLY to | ||
1158 | change the response's HTTP version while maintaining strict compliance | ||
1159 | with HTTP 1.0 regarding connection management. | ||
1160 | |||
1161 | This solution is not perfect as this flag is set on the response which | ||
1162 | is created after header processing. So MHD will behave as a HTTP 1.1 | ||
1163 | server until the response is queued. It means that an invalid HTTP 1.1 | ||
1164 | request will fail even if the response is sent with HTTP 1.0 and the | ||
1165 | request would be valid if interpreted with this version. For example, | ||
1166 | this request will fail in strict mode: | ||
1167 | |||
1168 | @verbatim | ||
1169 | GET / HTTP/1.1 | ||
1170 | @end verbatim | ||
1171 | |||
1172 | as the ``Host'' header is missing and is mandatory in HTTP 1.1, but it | ||
1173 | should succeed when interpreted with HTTP 1.0. | ||
1147 | @end table | 1174 | @end table |
1148 | @end deftp | 1175 | @end deftp |
1149 | 1176 | ||