{"id":1140,"date":"2012-06-04T01:40:20","date_gmt":"2012-06-03T16:40:20","guid":{"rendered":"http:\/\/blog.xcir.net\/?p=1140"},"modified":"2012-06-04T02:35:14","modified_gmt":"2012-06-03T17:35:14","slug":"varnish%e3%81%a7post%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e6%89%b1%e3%81%86%e3%81%9f%e3%82%81%e3%81%aevmod%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9fvmod-parsepost","status":"publish","type":"post","link":"https:\/\/blog.xcir.net\/?p=1140","title":{"rendered":"Varnish\u3067POST\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u305f(vmod-parsepost)"},"content":{"rendered":"<p>Varnish\u306f\u57fa\u672c\u7684\u306bPOST\u30c7\u30fc\u30bf\u3092\u89e3\u91c8\u3057\u3066\u306a\u306b\u304b\u3057\u3089\u306e\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u305d\u3053\u307e\u3067\u4e0d\u4fbf\u306f\u306a\u3044\u3068\u306f\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u305f\u3068\u3048\u3070\u7279\u5b9a\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u304cPOST\u306b\u5165\u3063\u3066\u305f\u3089<br \/>\nVarnish\u3067\u306f\u3058\u304d\u305f\u3044\u3068\u3044\u3063\u305f\u3053\u3068\u306f\u666e\u901a\u306f\u51fa\u6765\u307e\u305b\u3093\u3002\uff08\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u3063\u307d\u3044\u30af\u30a8\u30ea\u3068\u304b\uff09<br \/>\n\u305d\u306e\u305f\u3081Varnish\u3067POST\u3092\u624b\u8efd\u306b\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7279\u5fb4\u30fb\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3000\u30fbapplication\/x-www-form-urlencoded\u3068multipart\/form-data\u4e21\u65b9\u306b\u5bfe\u5fdc<br \/>\n\u3000\u30fb\u30d1\u30fc\u30b9\u3057\u305f\u5024\u3092req.http.*\u306b\u683c\u7d0d\u3059\u308b<br \/>\n\u3000\u30fb\u6307\u5b9a\u3055\u308c\u305f\u30d8\u30c3\u30c0\u306b\u30d1\u30fc\u30b9\u3057\u3066\u3044\u306a\u3044\u751f\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u53ef\u80fd<br \/>\n\u3000\u30fbmultipart\u306e\u30c7\u30fc\u30bf\u306furlencode\u3057\u3066\u683c\u7d0d<br \/>\n\u3000\u30fbmultipart\u306e\u751f\u30c7\u30fc\u30bf\u306f\uff08\u6271\u3044\u3065\u3089\u3044\u306e\u3067\uff09application\/x-www-form-urlencoded\u3068\u540c\u3058\u5f62\u5f0f\u306b\u76f4\u3057\u3066\u683c\u7d0d<br \/>\n\u3000\u30fbmultipart\u6642\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u3082\u683c\u7d0d<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; \">\n\r\n\/\/VCL\r\nif(parsepost.parse(&quot;x-raw&quot;,true,&quot;p_&quot;,true,true) == 1){\r\n  std.log(&quot;raw: &quot; + req.http.x-raw);\r\n  std.log(&quot;submitter: &quot; + req.http.p_submitter);\r\n  std.log(&quot;submitter2: &quot; + req.http.p_submitter2);\r\n}\r\n\r\n\/\/response\r\n12 VCL_Log      c raw: submitter=abcdef&amp;submitter2=b\r\n12 VCL_Log      c submitter: abcdef\r\n12 VCL_Log      c submitter2: b\r\n\n<\/pre>\n<p>\u307e\u305f\u7279\u6027\u4e0a\u30bb\u30c3\u30b7\u30e7\u30f3\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u3068\u30b9\u30bf\u30c3\u30af\u3092\u591a\u304f\u4f7f\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408\u306f<br \/>\nVarnish\u306esess_workspace\u306e\u5024\u306e\u5f15\u304d\u4e0a\u3052\u3068ulimit -s\u306e\u5024\u306e\u5f15\u304d\u4e0a\u3052\u3092\u884c\u306a\u3063\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u307e\u305fhttp_req_size\u3092\u5927\u304d\u3081\u306b\u3057\u3066\u304a\u304f\u3068\u7d50\u679c\u3068\u3057\u3066\u30e1\u30e2\u30ea\u306e\u7bc0\u7d04\u306b\u306a\u308a\u307e\u3059<\/p>\n<p>\u3042\u3068\u751f\u30c7\u30fc\u30bf\u306f\u5927\u304d\u304f\u306a\u308a\u304c\u3061\u306a\u306e\u3067\u4f7f\u3044\u7d42\u308f\u3063\u305f\u3089unset\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059<br \/>\n\u305d\u3046\u3057\u306a\u3044\u3068\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u30d5\u30a7\u30c3\u30c1\u3059\u308b\u969b\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u542b\u307e\u308c\u3066\u30d8\u30c3\u30c0\u5927\u304d\u3059\u304e\u30a8\u30e9\u30fc(413 Request Entity Too Large\/400 Bad Request)\u304c\u51fa\u308b\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/xcir\/libvmod-parsepost\" title=\"vmod-parsepost\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089\u304b\u3089<\/a><\/p>\n<div class='wp_social_bookmarking_light'>        <div class=\"wsbl_hatena\"><a href='\/\/b.hatena.ne.jp\/add?mode=confirm&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1140&title=Varnish%E3%81%A7POST%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E6%89%B1%E3%81%86%E3%81%9F%E3%82%81%E3%81%AEVMOD%E3%82%92%E4%BD%9C%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F%28vmod-parsepost%29' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/hatena.gif' alt='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' title='\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0' width='16' height='12' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_hatena_users\"><a href='\/\/b.hatena.ne.jp\/entry\/https:\/\/blog.xcir.net\/?p=1140' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u3067POST\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u305f(vmod-parsepost)' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='\/\/b.hatena.ne.jp\/entry\/image\/https:\/\/blog.xcir.net\/?p=1140' alt='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u3067POST\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u305f(vmod-parsepost)' title='\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af - Varnish\u3067POST\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u305f(vmod-parsepost)'   class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_facebook\"><a href='http:\/\/www.facebook.com\/share.php?u=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1140&t=Varnish%E3%81%A7POST%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E6%89%B1%E3%81%86%E3%81%9F%E3%82%81%E3%81%AEVMOD%E3%82%92%E4%BD%9C%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F%28vmod-parsepost%29' title='Facebook \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/facebook.png' alt='Facebook \u306b\u30b7\u30a7\u30a2' title='Facebook \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_linkedin\"><a href='\/\/www.linkedin.com\/shareArticle?mini=true&url=https%3A%2F%2Fblog.xcir.net%2F%3Fp%3D1140&title=Varnish%E3%81%A7POST%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E6%89%B1%E3%81%86%E3%81%9F%E3%82%81%E3%81%AEVMOD%E3%82%92%E4%BD%9C%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F%28vmod-parsepost%29' title='LinkedIn \u306b\u30b7\u30a7\u30a2' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank><img src='https:\/\/blog.xcir.net\/wp-content\/plugins\/wp-social-bookmarking-light\/public\/images\/linkedin.png' alt='LinkedIn \u306b\u30b7\u30a7\u30a2' title='LinkedIn \u306b\u30b7\u30a7\u30a2' width='16' height='16' class='wp_social_bookmarking_light_img' \/><\/a><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/blog.xcir.net\/?p=1140\" data-text=\"Varnish\u3067POST\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306eVMOD\u3092\u4f5c\u3063\u3066\u307f\u305f(vmod-parsepost)\" data-lang=\"ja\">Tweet<\/a><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>Varnish\u306f\u57fa\u672c\u7684\u306bPOST\u30c7\u30fc\u30bf\u3092\u89e3\u91c8\u3057\u3066\u306a\u306b\u304b\u3057\u3089\u306e\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u305d\u3053\u307e\u3067\u4e0d\u4fbf\u306f\u306a\u3044\u3068\u306f\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u305f\u3068\u3048\u3070\u7279\u5b9a\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u304cPOST\u306b\u5165\u3063\u3066\u305f\u3089 Varnish\u3067\u306f\u3058\u304d\u305f\u3044\u3068\u3044\u3063\u305f\u3053\u3068\u306f\u666e\u901a\u306f <a href='https:\/\/blog.xcir.net\/?p=1140' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,34,41],"class_list":["post-1140","post","type-post","status-publish","format-standard","hentry","category-3","tag-varnish","tag-vmod","tag-vmod-postparse","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1140"}],"version-history":[{"count":12,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1140\/revisions"}],"predecessor-version":[{"id":1155,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=\/wp\/v2\/posts\/1140\/revisions\/1155"}],"wp:attachment":[{"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xcir.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}