Skip to content

Instantly share code, notes, and snippets.

@nikushi
Last active December 29, 2015 23:49
Show Gist options
  • Save nikushi/7745631 to your computer and use it in GitHub Desktop.
Save nikushi/7745631 to your computer and use it in GitHub Desktop.

画像が表示されバージョン

Client < GF
HTTP/1.0 200 OK                                 
Date: Mon, 02 Dec 2013 05:44:30 GMT             
Server: Plack::Handler::Starlet                 
Content-Type: image/png                         
X-Frame-Options: DENY                           
X-XSS-Protection: 1                             
X-Powered-By: GrowthForecast/0.62               

Client <- Yohoushi
HTTP/1.1 200 OK                                           
Date: Mon, 02 Dec 2013 05:38:45 GMT                       
Status: 200 OK                                            
Connection: close                                         
server: Plack::Handler::Starlet                           
content-type: image/png                                   
x-frame-options: DENY                                     
x-xss-protection: 1                                       
x-powered-by: GrowthForecast/0.62                         
Cache-Control: no-cache                                   
X-Request-Id: 23f6e7b7-fc2d-4108-a955-8f527ccb181f        
X-Runtime: 0.049473                                       

画像が表示されないバージョン

Client <- GF
HTTP/1.1 200 OK                        
Date: Mon, 02 Dec 2013 05:46:54 GMT    
Server: Plack::Handler::Starlet        
Content-Type: image/png                
X-Frame-Options: DENY                  
X-XSS-Protection: 1                    
X-Powered-By: GrowthForecast/0.72      
Transfer-Encoding: chunked             
Connection: close                      

Client <- Yohoushi
HTTP/1.1 200 OK                                       
Date: Mon, 02 Dec 2013 05:46:07 GMT                   
Server: Plack::Handler::Starlet                       
Content-Type: image/png                               
X-Frame-Options: DENY                                 
X-Xss-Protection: 1                                   
X-Powered-By: GrowthForecast/0.72                     
Transfer-Encoding: chunked                            
Connection: close                                     
Cache-Control: no-cache                               
X-Request-Id: 3e14b1fc-08cc-4505-bfc8-7a5041f86011    
X-Runtime: 0.049946                                   
Content-Length: 0                                     
Set-Cookie: __profilin=p%3Dt; path=/                  
Set-Cookie: __profilin=p%3Dt; path=/                  
  • Content-LengthとTransfer-Encoding: chunked両方ついてておかしい
  • Content-Lengthおかしい

画像が表示されないバージョン(ためしにcurl -0してみた)

$ curl -0 -o out.png -v 'http://localhost:3000/graph/production/server1/active_user'

* About to connect() to localhost port 3000 (#0)                                                              
*   Trying ::1...                                                                                             
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                               
                                 Dload  Upload   Total   Spent    Left  Speed                                 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connection refused            
*   Trying 127.0.0.1...                                                                                       
* connected                                                                                                   
* Connected to localhost (127.0.0.1) port 3000 (#0)                                                           
> GET /graph/production/server1/active_user?height=90&notitle=1&t=sd&width=306 HTTP/1.0                       
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5                  
> Host: localhost:3000                                                                                        
> Accept: */*                                                                                                 
>                                                                                                             
< HTTP/1.1 200 OK                                                                                             
< Date: Mon, 02 Dec 2013 06:19:37 GMT                                                                         
< Server: Plack::Handler::Starlet                                                                             
< Content-Type: image/png                                                                                     
< X-Frame-Options: DENY                                                                                       
< X-Xss-Protection: 1                                                                                         
< X-Powered-By: GrowthForecast/0.72                                                                           
< Transfer-Encoding: chunked              # クライアントがHTTP/1.0でといったのにTransfer-Encoding: chunked返してきた                                                                    
< Connection: close                                                                                           
< Cache-Control: no-cache                                                                                     
< X-Request-Id: b00de400-5a48-409a-a761-e78b478e05c8                                                          
< X-Runtime: 0.041263                                                                                         
< Content-Length: 6872                                                                                        
< Set-Cookie: __profilin=p%3Dt; path=/                                                                        
< Set-Cookie: __profilin=p%3Dt; path=/                                                                        
<                                                                                                             
{ [data not shown]                                                                                            
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment