summaryrefslogtreecommitdiffstats
path: root/_build/static/archives/extend/2013-October/000286.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-29 12:39:49 +0200
committerLoïc Hoguin <[email protected]>2016-08-29 12:40:03 +0200
commitc807880f7ac73f813b2660ea81a00f7712a4e793 (patch)
treeba1d09e9b177f230665a80513b33fbd532000ce4 /_build/static/archives/extend/2013-October/000286.html
parentb1df25a7d9cda697513650659b781b55b40898f8 (diff)
downloadninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz
ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2
ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip
Add old mailing list archives
Diffstat (limited to '_build/static/archives/extend/2013-October/000286.html')
-rw-r--r--_build/static/archives/extend/2013-October/000286.html117
1 files changed, 117 insertions, 0 deletions
diff --git a/_build/static/archives/extend/2013-October/000286.html b/_build/static/archives/extend/2013-October/000286.html
new file mode 100644
index 00000000..bc94b505
--- /dev/null
+++ b/_build/static/archives/extend/2013-October/000286.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [99s-extend] cowboy_rest, POST and redirect
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20cowboy_rest%2C%20POST%20and%20redirect&In-Reply-To=%3CCE953B4E.76B1%25rolph.deruiter%40spilgames.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="000285.html">
+ <LINK REL="Next" HREF="000287.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[99s-extend] cowboy_rest, POST and redirect</H1>
+ <B>Rolph de Ruiter</B>
+ <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20cowboy_rest%2C%20POST%20and%20redirect&In-Reply-To=%3CCE953B4E.76B1%25rolph.deruiter%40spilgames.com%3E"
+ TITLE="[99s-extend] cowboy_rest, POST and redirect">Rolph.deRuiter at spilgames.com
+ </A><BR>
+ <I>Tue Oct 29 10:16:15 CET 2013</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000285.html">[99s-extend] cowboy_rest, POST and redirect
+</A></li>
+ <LI>Next message: <A HREF="000287.html">[99s-extend] REST handler failure
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#286">[ date ]</a>
+ <a href="thread.html#286">[ thread ]</a>
+ <a href="subject.html#286">[ subject ]</a>
+ <a href="author.html#286">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>(forgot to include the list)
+
+On 10/29/13 10:14 AM, &quot;Rolph de Ruiter&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">Rolph.deRuiter at spilgames.com</A>&gt;
+wrote:
+
+&gt;<i>Thanks!
+</I>&gt;<i>
+</I>&gt;<i>{halt, NewReq, State} worked like a charm :)
+</I>&gt;<i>
+</I>&gt;<i>Cheers,
+</I>&gt;<i>Rolph
+</I>&gt;<i>
+</I>&gt;<i>On 10/29/13 10:09 AM, &quot;Lo&#239;c Hoguin&quot; &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt; wrote:
+</I>&gt;<i>
+</I>&gt;&gt;<i>On 10/29/2013 10:00 AM, Rolph de Ruiter wrote:
+</I>&gt;&gt;&gt;<i> Hi,
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> I'm using cowboy_rest for a part of our api to handle POST requests.
+</I>&gt;&gt;&gt;<i> Under certain conditions, I would like to redirect to a new location
+</I>&gt;&gt;&gt;<i> (based on availability of the redirect qs parameter).
+</I>&gt;&gt;&gt;<i> I was unable to get the moved_temporarily/2 callback to work (was not
+</I>&gt;&gt;&gt;<i> invoked at al). So I just do the 302 myself, using cowboy_req:reply/4.
+</I>&gt;&gt;&gt;<i> This works, however, every time it produces an error in the emulator
+</I>&gt;&gt;&gt;<i> process:
+</I>&gt;&gt;&gt;<i> [error] emulator Error in process &lt;0.509.0&gt; on node '<A HREF="https://lists.ninenines.eu/listinfo/extend">api at dev.loc</A>'
+</I>&gt;&gt;&gt;<i>with
+</I>&gt;&gt;&gt;<i> exit value: {function_clause,[{cowboy_req,reply,[204,[],&lt;&lt;0
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,{http_req,#Port&lt;0.14491&gt;,ranch_tcp,keepalive,&lt;0.509.0&gt;,&lt;&lt;4
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,'HTTP/1.1',{{10,10,10,1},62197},&lt;&lt;15
+</I>&gt;&gt;&gt;<i>bytes&gt;&gt;,undefined,8000,&lt;&lt;26
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,undefined,&lt;&lt;14 bytes&gt;&gt;,[{&lt;&lt;8 bytes&gt;&gt;,&lt;&lt;5 bytes&gt;&gt;}],[{method,&lt;&lt;5
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;}],[{&lt;&lt;4 bytes&gt;&gt;,&lt;&lt;20 bytes&gt;&gt;},{&lt;&lt;10 bytes&gt;&gt;,&lt;&lt;10 bytes&gt;&gt;},{&lt;&lt;14
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,&lt;&lt;2 bytes&gt;&gt;},{&lt;&lt;6 bytes&gt;&gt;,&lt;&lt;74 bytes&gt;&gt;},{&lt;&lt;6 bytes&gt;&gt;,&lt;&lt;27
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;},{&lt;&lt;10 bytes&gt;&gt;,&lt;&lt;120 bytes&gt;&gt;},{&lt;&lt;12 bytes&gt;&gt;,&lt;&lt;33 bytes&gt;&gt;},{&lt;&lt;7
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,&lt;&lt;54 bytes&gt;&gt;},{&lt;&lt;15 bytes&gt;&gt;,&lt;&lt;17 bytes&gt;&gt;},{&lt;&lt;15 bytes&gt;&gt;,&lt;&lt;14
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;},{&lt;&lt;6 bytes&gt;&gt;,&lt;&lt;245 bytes&gt;&gt;}],[{&lt;&lt;14 bytes&gt;&gt;,34},{&lt;&lt;6
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,undefined},{&lt;&lt;14 bytes&gt;&gt;,34},{&lt;&lt;12 bytes&gt;&gt;,{&lt;&lt;11 bytes&gt;&gt;,&lt;&lt;21
+</I>&gt;&gt;&gt;<i> bytes&gt;&gt;,[]}},{&lt;&lt;17 bytes&gt;&gt;,undefined},{&lt;&lt;13 bytes&gt;&gt;,...
+</I>&gt;&gt;&gt;<i>
+</I>&gt;&gt;&gt;<i> Can you point me out how to (ideally) make use of moved_temporarily/2
+</I>&gt;&gt;&gt;<i>or
+</I>&gt;&gt;&gt;<i> how I can prevent cowboy_rest from wanting to reply with 204 in this
+</I>&gt;&gt;&gt;<i>case?
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i>moved_temporarily is only called if the resource previously existed.
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i>As for calling reply yourself, you just need to return {halt, NewReq,
+</I>&gt;&gt;<i>State} afterwards.
+</I>&gt;&gt;<i>
+</I>&gt;&gt;<i>--
+</I>&gt;&gt;<i>Lo&#239;c Hoguin
+</I>&gt;&gt;<i>Erlang Cowboy
+</I>&gt;&gt;<i>Nine Nines
+</I>&gt;&gt;<i><A HREF="http://ninenines.eu">http://ninenines.eu</A>
+</I>&gt;<i>
+</I>
+
+</PRE>
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000285.html">[99s-extend] cowboy_rest, POST and redirect
+</A></li>
+ <LI>Next message: <A HREF="000287.html">[99s-extend] REST handler failure
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#286">[ date ]</a>
+ <a href="thread.html#286">[ thread ]</a>
+ <a href="subject.html#286">[ subject ]</a>
+ <a href="author.html#286">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
+mailing list</a><br>
+</body></html>