2012-12-03 33 views
1

如何設置Perl舞者以默認HTTP/1.1來回答?我剛剛開始了一個Hello World應用,使用HTTP/1.1解僱了我的curl,並用HTTP/1.0回答。強制Perl舞者說HTTP/1.1

[email protected]:~/MyWeb-App/lib/MyWeb$ curl -v http://localhost:3000 

About to connect() to localhost port 3000 (#0) 
> * Trying 127.0.0.1... connected 
> * GET/HTTP/1.1 
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 
> Host: localhost:3000 
> Accept: */* 
> HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Server: Perl Dancer 1.311 < Content-Length: 5601 < Content-Type: text/html; 
> charset=utf-8 < X-Powered-By: Perl Dancer 1.311 

回答

2

它看起來像HTTP協議是硬編碼在HTTP ::服務器::簡單:: PSGI,這是在獨立模式下運行時是什麼舞者使用。

https://metacpan.org/module/Dancer::Deployment有關於部署應用程序選項的詳細信息。

作爲一個快速測試,我做了plackup -s Starman -a ./hello_world.pl,它用HTTP/1.1而不是HTTP/1.0來回答。

+0

經過長時間的研究,我發現它,但是謝謝! –