summaryrefslogtreecommitdiffstats
path: root/archives/extend/attachments/20140915/26d4e023
diff options
context:
space:
mode:
Diffstat (limited to 'archives/extend/attachments/20140915/26d4e023')
-rw-r--r--archives/extend/attachments/20140915/26d4e023/attachment-0001.html12
-rw-r--r--archives/extend/attachments/20140915/26d4e023/attachment.html12
2 files changed, 24 insertions, 0 deletions
diff --git a/archives/extend/attachments/20140915/26d4e023/attachment-0001.html b/archives/extend/attachments/20140915/26d4e023/attachment-0001.html
new file mode 100644
index 00000000..c4f70e58
--- /dev/null
+++ b/archives/extend/attachments/20140915/26d4e023/attachment-0001.html
@@ -0,0 +1,12 @@
+<tt>
+&lt;div&nbsp;dir=&quot;ltr&quot;&gt;Hi.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&nbsp;recently&nbsp;implemented&nbsp;a&nbsp;checksum&nbsp;header&nbsp;(X-Checksum)&nbsp;that&nbsp;allows&nbsp;validating&nbsp;the&nbsp;content&nbsp;of&nbsp;a&nbsp;request&#39;s&nbsp;body&nbsp;by&nbsp;hash&nbsp;comparison&nbsp;(just&nbsp;to&nbsp;give&nbsp;you&nbsp;some&nbsp;context).&nbsp;I&#39;m&nbsp;using&nbsp;the&nbsp;onrequest&nbsp;hook&nbsp;to&nbsp;affect&nbsp;all&nbsp;requests&nbsp;(and&nbsp;be&nbsp;able&nbsp;to&nbsp;reply&nbsp;appropriately&nbsp;for&nbsp;non-conformance&nbsp;to&nbsp;the&nbsp;hash&nbsp;function&nbsp;result)&nbsp;but&nbsp;can&#39;t&nbsp;figure&nbsp;out&nbsp;how&nbsp;to&nbsp;not&nbsp;read&nbsp;the&nbsp;request&nbsp;body&nbsp;twice,&nbsp;i.e.&nbsp;I&nbsp;read&nbsp;it&nbsp;in&nbsp;the&nbsp;onrequest&nbsp;hook&nbsp;but&nbsp;later&nbsp;on&nbsp;need&nbsp;to&nbsp;read&nbsp;it&nbsp;again&nbsp;in&nbsp;the&nbsp;route&nbsp;handler,&nbsp;but&nbsp;I&nbsp;can&#39;t&nbsp;(from&nbsp;the&nbsp;manual,&nbsp;for&nbsp;cowboy_req:body:&nbsp;&quot;This&nbsp;function&nbsp;can&nbsp;only&nbsp;be&nbsp;called&nbsp;once.&nbsp;Cowboy&nbsp;will&nbsp;not&nbsp;cache&nbsp;the&nbsp;result&nbsp;of&nbsp;this&nbsp;call.&quot;).&nbsp;At&nbsp;the&nbsp;moment,&nbsp;and&nbsp;because&nbsp;the&nbsp;API&nbsp;consumers&nbsp;were&nbsp;in&nbsp;a&nbsp;hurry,&nbsp;the&nbsp;solution&nbsp;I&nbsp;found&nbsp;(I&nbsp;understand&nbsp;it&nbsp;might&nbsp;be&nbsp;an&nbsp;ugly&nbsp;hack),&nbsp;was&nbsp;to&nbsp;read&nbsp;the&nbsp;body,&nbsp;store&nbsp;it&nbsp;in&nbsp;the&nbsp;Req&#39;s&nbsp;meta&nbsp;(property&nbsp;body,&nbsp;for&nbsp;example)&nbsp;and&nbsp;then&nbsp;access&nbsp;that&nbsp;property&nbsp;later&nbsp;on,&nbsp;instead&nbsp;of&nbsp;using&nbsp;cowboy_req:body.&nbsp;I&#39;m&nbsp;not&nbsp;quite&nbsp;happy&nbsp;with&nbsp;this&nbsp;solution&nbsp;and&nbsp;was&nbsp;wondering&nbsp;if&nbsp;there&nbsp;is&nbsp;anything&nbsp;more&nbsp;elegant&nbsp;that&nbsp;I&nbsp;can&nbsp;implement.&lt;/div&gt;<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Cheers.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-&nbsp;Paulo&nbsp;F.&nbsp;Oliveira&lt;/div&gt;&lt;/div&gt;<br>
+
+</tt>
diff --git a/archives/extend/attachments/20140915/26d4e023/attachment.html b/archives/extend/attachments/20140915/26d4e023/attachment.html
new file mode 100644
index 00000000..c4f70e58
--- /dev/null
+++ b/archives/extend/attachments/20140915/26d4e023/attachment.html
@@ -0,0 +1,12 @@
+<tt>
+&lt;div&nbsp;dir=&quot;ltr&quot;&gt;Hi.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&nbsp;recently&nbsp;implemented&nbsp;a&nbsp;checksum&nbsp;header&nbsp;(X-Checksum)&nbsp;that&nbsp;allows&nbsp;validating&nbsp;the&nbsp;content&nbsp;of&nbsp;a&nbsp;request&#39;s&nbsp;body&nbsp;by&nbsp;hash&nbsp;comparison&nbsp;(just&nbsp;to&nbsp;give&nbsp;you&nbsp;some&nbsp;context).&nbsp;I&#39;m&nbsp;using&nbsp;the&nbsp;onrequest&nbsp;hook&nbsp;to&nbsp;affect&nbsp;all&nbsp;requests&nbsp;(and&nbsp;be&nbsp;able&nbsp;to&nbsp;reply&nbsp;appropriately&nbsp;for&nbsp;non-conformance&nbsp;to&nbsp;the&nbsp;hash&nbsp;function&nbsp;result)&nbsp;but&nbsp;can&#39;t&nbsp;figure&nbsp;out&nbsp;how&nbsp;to&nbsp;not&nbsp;read&nbsp;the&nbsp;request&nbsp;body&nbsp;twice,&nbsp;i.e.&nbsp;I&nbsp;read&nbsp;it&nbsp;in&nbsp;the&nbsp;onrequest&nbsp;hook&nbsp;but&nbsp;later&nbsp;on&nbsp;need&nbsp;to&nbsp;read&nbsp;it&nbsp;again&nbsp;in&nbsp;the&nbsp;route&nbsp;handler,&nbsp;but&nbsp;I&nbsp;can&#39;t&nbsp;(from&nbsp;the&nbsp;manual,&nbsp;for&nbsp;cowboy_req:body:&nbsp;&quot;This&nbsp;function&nbsp;can&nbsp;only&nbsp;be&nbsp;called&nbsp;once.&nbsp;Cowboy&nbsp;will&nbsp;not&nbsp;cache&nbsp;the&nbsp;result&nbsp;of&nbsp;this&nbsp;call.&quot;).&nbsp;At&nbsp;the&nbsp;moment,&nbsp;and&nbsp;because&nbsp;the&nbsp;API&nbsp;consumers&nbsp;were&nbsp;in&nbsp;a&nbsp;hurry,&nbsp;the&nbsp;solution&nbsp;I&nbsp;found&nbsp;(I&nbsp;understand&nbsp;it&nbsp;might&nbsp;be&nbsp;an&nbsp;ugly&nbsp;hack),&nbsp;was&nbsp;to&nbsp;read&nbsp;the&nbsp;body,&nbsp;store&nbsp;it&nbsp;in&nbsp;the&nbsp;Req&#39;s&nbsp;meta&nbsp;(property&nbsp;body,&nbsp;for&nbsp;example)&nbsp;and&nbsp;then&nbsp;access&nbsp;that&nbsp;property&nbsp;later&nbsp;on,&nbsp;instead&nbsp;of&nbsp;using&nbsp;cowboy_req:body.&nbsp;I&#39;m&nbsp;not&nbsp;quite&nbsp;happy&nbsp;with&nbsp;this&nbsp;solution&nbsp;and&nbsp;was&nbsp;wondering&nbsp;if&nbsp;there&nbsp;is&nbsp;anything&nbsp;more&nbsp;elegant&nbsp;that&nbsp;I&nbsp;can&nbsp;implement.&lt;/div&gt;<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Cheers.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-&nbsp;Paulo&nbsp;F.&nbsp;Oliveira&lt;/div&gt;&lt;/div&gt;<br>
+
+</tt>