<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Can I use http and stream like this</p>
<p><br>
</p>
<p>http {</p>
<p> ......................</p>
<p>}</p>
<div><br>
</div>
stream {
<div> ......................</div>
<div>}</div>
<div><br>
</div>
<div>in same nginx.conf</div>
<div><br>
</div>
<div>Thank you<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> nginx <nginx-bounces@nginx.org> on behalf of Richard Stanway <r1ch+nginx@teamliquid.net><br>
<b>Sent:</b> Monday, October 24, 2016 10:25 PM<br>
<b>To:</b> nginx@nginx.org<br>
<b>Subject:</b> Re: Receive raw data</font>
<div> </div>
</div>
<div>
<div dir="ltr">Nginx will need a valid header in order to know what to do with the request. Maybe you should look into the stream module instead.
<div><br>
</div>
<div><a href="https://nginx.org/en/docs/stream/ngx_stream_core_module.html" id="LPlnk868716" previewremoved="true">https://nginx.org/en/docs/stream/ngx_stream_core_module.html</a></div>
<div id="LPBorder_GT_14775836054680.7813408313421246" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14775836054640.7190769902004748" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14775836054660.40656943004007773" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14775836054660.4376467764624925"></div>
<div id="LPTitle_14775836054660.12777412229173835" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14775836054660.33354915171617106" href="https://nginx.org/en/docs/stream/ngx_stream_core_module.html" target="_blank" style="text-decoration: none;">Module ngx_stream_core_module - nginx.org</a></div>
<div id="LPMetadata_14775836054670.21579313426150648" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
nginx.org</div>
<div id="LPDescription_14775836054670.3073922927269539" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Sets the address and port for the socket on which the server will accept connections. It is possible to specify just the port. The address can also be a hostname, for ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Oct 24, 2016 at 2:56 PM, Nattakorn S <span dir="ltr">
<<a href="mailto:dragon_nat@hotmail.com" target="_blank">dragon_nat@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div id="m_-265548356654214625divtagdefaultwrapper" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear all</p>
<p><br>
</p>
<p>I have electronic device and I config to send TCP/IP data to my server by raw data no http header.</p>
<p>My server use nginx with fastcgi for webserver and develop my application for get message from port 8080.</p>
<p>But nginx always response with error 400 with "<span>client sent invalid method while reading client request line</span>".</p>
<p>I know cause my <span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">electronic device not have correct header in packet.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">So I try add "<span>ignore_invalid_headers off;</span>" in http scope but not
work.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">I need to bypass raw data to my application.</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px"><br>
</span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">Thank you.</span></p>
<p><br>
</p>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>