hey folks,<br><br>I ran into a funny issue with nginx when working on accepting oauth calls.&nbsp; Nginx is stripping the authorization header out if the field value contains newlines.&nbsp; Http 1.1 guidelines state that this is valid:<br>
<br><br><br>to recreate, do the following:<br>* add $http_authorization to your nginx &#39;log_format main&#39; clause so you can see what is happening (or print out the headers from wherever nginx proxies the call to)<br>
<br>* run a curl command like this against your nginx server:<br>curl -d &#39;&#39; -H &#39;Authorization: OAuth realm=&quot;&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_signature_method=&quot;HMAC-SHA1&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_signature=&quot;RmNuGxdkf6EaU%2Fy4PXgHj07aA3I%3D&quot;,<br>
&nbsp;&nbsp;&nbsp; oauth_nonce=&quot;49a19e21eebf0&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_timestamp=&quot;1235328545&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_token=&quot;some_token&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_consumer_key=&quot;consumer_key&quot;,<br>&nbsp;&nbsp;&nbsp; oauth_version=&quot;1.0&quot;&#39; <a href="http://your.server.com">http://your.server.com</a><br>
<br>* you&#39;ll see the header value terminated after the first &#39;OAuth realm=&quot;&quot;,&#39; <br>* try the same curl command but remove the return characters, and it will work <br><br>the same behavior occurs when I strip out all proxy, compression, and ssl and try to leave a very basic config file.&nbsp; here is some information about nginx:<br>
<br># nginx -V<br>nginx version: nginx/0.6.34<br>built by gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu3)<br>configure arguments: --sbin-path=/usr/sbin --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --with-http_ssl_module --with-http_stub_status_module --add-module=/tmp/src/nginx/modules/nginx-upstream-fair<br>
<br>I&#39;m a bit surprised that I&#39;m seeing this and while I&#39;m starting to suspect nginx I&#39;m sure it is possible that I&#39;m missing something.&nbsp; If this is a valid bug, let me know what you would like in terms of additional documentation, examples, etc.<br>
<br>thank you!<br>Adam<br><br><br>