Welcome! Log In Create A New Profile

Advanced

Re: TCP Connection

All files from this thread

File Name File Size   Posted by Date  
nginx.conf 1.7 KB open | download Giulio Loffreda 03/04/2016 Read message
nginx.conf 1.7 KB open | download Giulio Loffreda 03/04/2016 Read message
Giulio Loffreda
March 04, 2016 11:42AM
Thank you for your answer.

Here is my log after the request, my request, my response and my nginx.conf

root@vps190138:~# cat /var/log/nginx-error.log
2016/03/04 15:49:02 [notice] 8990#0: using the "epoll" event method
2016/03/04 15:49:02 [notice] 8990#0: nginx/1.8.1
2016/03/04 15:49:02 [notice] 8990#0: OS: Linux 3.13.0-66-generic
2016/03/04 15:49:02 [notice] 8990#0: getrlimit(RLIMIT_NOFILE): 1024:4096
2016/03/04 15:49:02 [notice] 8991#0: start worker processes
2016/03/04 15:49:02 [notice] 8991#0: start worker process 8993


#REQUEST
AT+CIPSTART="TCP", "myhost.com","80"
AT+CIPSEND=150

POST /devices/deviceRegister HTTP/1.1
Host: myhost.com
Cache-Control: no-cache
Content-Type: application/json
Content-Length:14

{"IMEI":"aa"}



#RESPONSE
SEND OK
HTTP/1.1 400 Bad Request
Server: nginx/1.8.1
Date: Fri, 04 Mar 2016 15:52:21 GMT
Content-Type: text/html
Content-Length: 172
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.8.1</center>
</body>
</html>


> Le 4 mars 2016 à 17:24, Valentin V. Bartenev <vbart@nginx.com> a écrit :
>
> On Friday 04 March 2016 17:20:18 Giulio Loffreda wrote:
>> Hi All,
>>
>> If I’m sending this email to wrong list, apologies and give me the good one.
>>
>> I have one embedded application which needs to connect via TCP and send an HTTP request.
>> We run Nginx on Ubuntu 14.04.
>>
>> I can connect and persist, but once the packet is sent, I get HTTP 400 without any log and without web server taking the request.
>>
>> I think it is a deeper level on Nginx but having hard to find a good answer.
>>
>> Hope somebody can help.
>>
> [..]
>
> The reason of 400 is usually logged on "info" level in error_log.
>
> See: http://nginx.org/r/error_log
>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - nginx.conf (1.7 KB)
Subject Author Posted

TCP Connection

Giulio Loffreda March 04, 2016 11:22AM

Re: TCP Connection

Valentin V. Bartenev March 04, 2016 11:26AM

Re: TCP Connection Attachments

Giulio Loffreda March 04, 2016 11:42AM

Re: TCP Connection

Valentin V. Bartenev March 04, 2016 12:58PM

Re: TCP Connection

Giulio Loffreda March 04, 2016 01:14PM

Re: TCP Connection

B.R. March 04, 2016 03:48PM

Re: TCP Connection

GreenGecko March 04, 2016 04:50PM

Re: TCP Connection Attachments

Giulio Loffreda March 04, 2016 05:26PM

Re: TCP Connection

Валентин Бартенев March 04, 2016 06:22PM

Re: TCP Connection

Maxim Konovalov March 05, 2016 01:42AM

Re: TCP Connection

Валентин Бартенев March 04, 2016 05:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready