summaryrefslogblamecommitdiffstats
path: root/archives/extend/2013-April/000116.html
blob: 0375b7de1fdc1f5c8d69f2caf7efb9dc266de4bf (plain) (tree)






















































































































































                                                                                                                                                                                                                                                                                                 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [99s-extend] 505 error
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20505%20error&In-Reply-To=%3C8D420762-BBE6-48AC-81C9-56FED6EDA3F2%40gmail.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <style type="text/css">
       pre {
           white-space: pre-wrap;       /* css-2.1, curent FF, Opera, Safari */
           }
   </style>
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000115.html">
   <LINK REL="Next"  HREF="000117.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] 505 error</H1>
    <B>Lee Sylvester</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20505%20error&In-Reply-To=%3C8D420762-BBE6-48AC-81C9-56FED6EDA3F2%40gmail.com%3E"
       TITLE="[99s-extend] 505 error">lee.sylvester at gmail.com
       </A><BR>
    <I>Mon Apr 22 16:40:19 CEST 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="000115.html">[99s-extend] 505 error
</A></li>
        <LI>Next message: <A HREF="000117.html">[99s-extend] 505 error
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#116">[ date ]</a>
              <a href="thread.html#116">[ thread ]</a>
              <a href="subject.html#116">[ subject ]</a>
              <a href="author.html#116">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Well, the below is the sent and return headers on the failing machine.  On a succeeding machine, the headers are

Request URL:<A HREF="http://www.example.com">http://www.example.com</A>
Request Method:OPTIONS
Status Code:200 OK

Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:origin, method, content-type
Access-Control-Request-Method:POST
Connection:keep-alive
Host:www.example.com
Origin:<A HREF="http://www.test.com">http://www.test.com</A>
Referer:<A HREF="http://www.test.com/">http://www.test.com/</A>
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31

Response Headersview source
Access-Control-Allow-Headers:Content-Type, X-Requested-With, Origin, Method
Access-Control-Allow-Methods:GET, POST, OPTIONS
Access-Control-Allow-Origin:*
connection:keep-alive
content-length:68
date:Mon, 22 Apr 2013 14:33:30 GMT
server:Cowboy

As you can see, the header control and content isn't being sent back and the connection is closed.

Thanks,
Lee




On 22 Apr 2013, at 15:28, &quot;Brown, Kevin&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">Kevin.Brown at turner.com</A>&gt; wrote:

&gt;<i> What is the exact http request sent on the failing and successful machines?  How do the differ?
</I>&gt;<i> 
</I>&gt;<i> Stack trace?
</I>&gt;<i> 
</I>&gt;<i> On Apr 22, 2013, at 9:00 AM, &quot;Lee Sylvester&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">lee.sylvester at gmail.com</A>&gt; wrote:
</I>&gt;<i> 
</I>&gt;&gt;<i> Hi guys,
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> So, I was getting a CORS issue when connecting to my Bullet impl, which I have since fixed.  I am now able to use these from many machines from many locations.  However, I have found some machines to be getting a 505 error when making a POST request to the Cowboy instance:
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Request URL:<A HREF="http://www.example.com">http://www.example.com</A>
</I>&gt;&gt;<i> Request Method:OPTIONS
</I>&gt;&gt;<i> Status Code:505 HTTP Version Not Supported
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Request Headersview source
</I>&gt;&gt;<i> Accept:*/*
</I>&gt;&gt;<i> Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
</I>&gt;&gt;<i> Accept-Encoding:gzip,deflate,sdch
</I>&gt;&gt;<i> Accept-Language:en-US,en;q=0.8
</I>&gt;&gt;<i> Access-Control-Request-Headers:origin, method, content-type
</I>&gt;&gt;<i> Access-Control-Request-Method:POST
</I>&gt;&gt;<i> Connection:keep-alive
</I>&gt;&gt;<i> Host:www.example.com
</I>&gt;&gt;<i> Origin:<A HREF="http://www.test.com">http://www.test.com</A>
</I>&gt;&gt;<i> Referer:<A HREF="http://www.test.com/">http://www.test.com/</A>
</I>&gt;&gt;<i> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Response Headersview source
</I>&gt;&gt;<i> connection:close
</I>&gt;&gt;<i> content-length:0
</I>&gt;&gt;<i> date:Mon, 22 Apr 2013 12:22:50 GMT
</I>&gt;&gt;<i> server:Cowboy
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> To get around the CORS issue, I set up an onrequest hook, which points to the function:
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> set_request_cors(Req) -&gt;
</I>&gt;&gt;<i>   Req2 = cowboy_req:set_resp_header(&lt;&lt;&quot;Access-Control-Allow-Methods&quot;&gt;&gt;, &lt;&lt;&quot;GET, POST, OPTIONS&quot;&gt;&gt;, Req),
</I>&gt;&gt;<i>   Req3 = cowboy_req:set_resp_header(&lt;&lt;&quot;Access-Control-Allow-Headers&quot;&gt;&gt;, &lt;&lt;&quot;Content-Type, X-Requested-With, Origin, Method&quot;&gt;&gt;, Req2),
</I>&gt;&gt;<i>   cowboy_req:set_resp_header(&lt;&lt;&quot;Access-Control-Allow-Origin&quot;&gt;&gt;, &lt;&lt;&quot;*&quot;&gt;&gt;, Req3).
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> I'm afraid I don't have any more info, but this issue is completely eluding me.
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Thanks,
</I>&gt;&gt;<i> Lee
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> Extend mailing list
</I>&gt;&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;&gt;<i> <A HREF="http://lists.ninenines.eu:81/listinfo/extend">http://lists.ninenines.eu:81/listinfo/extend</A>
</I>&gt;&gt;<i> 
</I>&gt;<i> 
</I>

</PRE>

<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000115.html">[99s-extend] 505 error
</A></li>
	<LI>Next message: <A HREF="000117.html">[99s-extend] 505 error
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#116">[ date ]</a>
              <a href="thread.html#116">[ thread ]</a>
              <a href="subject.html#116">[ subject ]</a>
              <a href="author.html#116">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>