mirror of
https://github.com/curl/curl.git
synced 2026-06-22 16:55:37 +03:00
parent
118f446ad5
commit
42843af0b8
7 changed files with 12 additions and 12 deletions
|
|
@ -4846,16 +4846,16 @@ AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
|
|||
if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
|
||||
AC_MSG_RESULT(yes)
|
||||
curl_ws_msg="enabled"
|
||||
AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable websockets support])
|
||||
AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable WebSockets support])
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
|
||||
if test "x$SSL_ENABLED" = "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
|
||||
fi
|
||||
experimental="$experimental Websockets"
|
||||
experimental="$experimental WebSockets"
|
||||
else
|
||||
dnl websockets requires >32 bit curl_off_t
|
||||
dnl WebSockets requires >32 bit curl_off_t
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([Websockets disabled due to lack of >32 bit curl_off_t])
|
||||
AC_MSG_WARN([WebSockets disabled due to lack of >32 bit curl_off_t])
|
||||
fi
|
||||
;;
|
||||
esac ],
|
||||
|
|
|
|||
|
|
@ -2203,7 +2203,7 @@ typedef enum {
|
|||
/* specify which protocols that libcurl is allowed to follow directs to */
|
||||
CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),
|
||||
|
||||
/* websockets options */
|
||||
/* WebSockets options */
|
||||
CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
|
||||
|
||||
/* CA cache timeout */
|
||||
|
|
|
|||
|
|
@ -3535,7 +3535,7 @@ static CURLcode http_on_response(struct Curl_easy *data,
|
|||
#endif
|
||||
|
||||
#ifdef USE_WEBSOCKETS
|
||||
/* All >=200 HTTP status codes are errors when wanting websockets */
|
||||
/* All >=200 HTTP status codes are errors when wanting WebSockets */
|
||||
if(data->req.upgr101 == UPGR101_WS) {
|
||||
failf(data, "Refused WebSockets upgrade: %d", k->httpcode);
|
||||
result = CURLE_HTTP_RETURNED_ERROR;
|
||||
|
|
|
|||
2
lib/ws.c
2
lib/ws.c
|
|
@ -1276,7 +1276,7 @@ static void ws_free(struct connectdata *conn)
|
|||
static CURLcode ws_setup_conn(struct Curl_easy *data,
|
||||
struct connectdata *conn)
|
||||
{
|
||||
/* websockets is 1.1 only (for now) */
|
||||
/* WebSockets is 1.1 only (for now) */
|
||||
data->state.httpwant = CURL_HTTP_VERSION_1_1;
|
||||
return Curl_http_setup_conn(data, conn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Websockets data echos
|
||||
* WebSockets data echos
|
||||
* </DESC>
|
||||
*/
|
||||
/* curl stuff */
|
||||
|
|
@ -265,7 +265,7 @@ int main(int argc, char *argv[])
|
|||
#else /* USE_WEBSOCKETS */
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
fprintf(stderr, "websockets not enabled in libcurl\n");
|
||||
fprintf(stderr, "WebSockets not enabled in libcurl\n");
|
||||
return 1;
|
||||
#endif /* !USE_WEBSOCKETS */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Websockets pingpong
|
||||
* WebSockets pingpong
|
||||
* </DESC>
|
||||
*/
|
||||
/* curl stuff */
|
||||
|
|
@ -160,7 +160,7 @@ int main(int argc, char *argv[])
|
|||
#else /* USE_WEBSOCKETS */
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
fprintf(stderr, "websockets not enabled in libcurl\n");
|
||||
fprintf(stderr, "WebSockets not enabled in libcurl\n");
|
||||
return 1;
|
||||
#endif /* !USE_WEBSOCKETS */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,6 +149,6 @@ CURLcode test(char *URL)
|
|||
return res;
|
||||
}
|
||||
|
||||
#else /* no websockets */
|
||||
#else /* no WebSockets */
|
||||
NO_SUPPORT_BUILT_IN
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue