[Libwebsockets] lwsts[7873]: ****** ec017ca0 Sending new, pending truncated ...

satya gowtham kudupudi satyagowtham.k at gmail.com
Thu Jun 16 06:52:17 CEST 2016


I have cranked up the debug level but I got no extra log

lwsts[15448]: libwebsockets echo test - (C) Copyright 2010-2013 Andy Green <
andy at warmcat.com> - licensed under LGPL2.1

lwsts[15448]: Running in server mode

lwsts[15448]: Initial logging level 65535

lwsts[15448]: Libwebsockets version: 2.0.1 gowtham at ubuntu-v2.0.1-4-g7d259d8

lwsts[15448]: IPV6 not compiled in

lwsts[15448]: libev support not compiled in

lwsts[15448]: libuv support not compiled in

lwsts[15448]:  Threads: 1 each 1024 fds

lwsts[15448]:  mem: platform fd map:  8192 bytes

lwsts[15448]:  Compiled with OpenSSL support

lwsts[15448]:  SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT

lwsts[15448]: Creating Vhost 'default' port 80, 2 protocols

lwsts[15448]:  Listening on port 80

lwsts[15448]:  mem: per-conn:          488 bytes + protocol rx buf

lwsts[15448]:  canonical_hostname = ubuntu

lwsts[15448]: lws_protocol_init

lwsts[15448]: ****** f4017ca0 Sending new, pending truncated ...

--
Gowtham

On Wed, Jun 15, 2016 at 2:17 AM, Andy Green <andy at warmcat.com> wrote:

>
>
> On June 15, 2016 1:00:18 AM GMT+08:00, satya gowtham kudupudi <
> satyagowtham.k at gmail.com> wrote:
> >I'm making http request to libwebsocket server using raw sockets.
> >I'm sending below headers
> >
> >"POST /index.html HTTP/1.1\r\n"
> >"User-Agent: myagent\r\n"
> >"Content-Type: text/json; charset=utf-8\r\n"
> >"Host: myhost\r\n"
> >"Content-Length: " + ccl + "\r\n"
> >"Connection: Keep-Alive\r\n\r\n"
> >
> >Response I got is "Forbidden request"
>
> There are two ways to literally get "Forbidden", which is 403 response code
>
> 1) Unknown method, or something illegal about what is supposed to be
> urlencoded uri args.  So % followed by non-hex chars, % and less than 2
> chars remaining, ? inappropriately etc
>
> 2) url after method didn't begin with /
>
> If 1), it will log "forbidding on uri sanitation"
>
> >I think the mistake is in User-Agent header field. Please help me.
>
> Crank up the debug level to 65535 and look at the logs, it should show in
> detail where the parsing stops.
>
> -Andy
>
> >Regards
> >Gowtham
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Libwebsockets mailing list
> >Libwebsockets at ml.libwebsockets.org
> >http://libwebsockets.org/mailman/listinfo/libwebsockets
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160616/c9d33524/attachment.html>


More information about the Libwebsockets mailing list