하나의 소스에서 feed.xml을 다운로드하려고합니다. 윈도우에서 성공적으로 다운로드 할 수 있습니다. 리눅스/유닉스 시스템에서 실패한 동안.wget을 사용하여 전체 파일을 가져올 수 없습니다.
이들은 내 Windows의 요청 헤더 및 응답 헤더입니다.
Response Header: Connection keep-alive
Content-Disposition attachment; filename="feeds.xml";
Content-Type text/xml
Date Wed, 24 Dec 2014 04:18:59 GMT
Expires Mon, 1 Jan 2000 00:00:00 GMT
Server nginx/1.2.3
Transfer-Encoding chunked
X-Powered-By PHP/5.3.13
Request: Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Connection keep-alive
Host www2.xyz.com
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
내 linux/unix 코드/명령은 URL에서 파일을 다운로드합니다. 창에서
wget --no-check-certificate -O feed.xml 'http://www2.xyz.com/feed.php?id=XXX-YYY&pass=*******'
크기는 크기가 다음 리눅스/유닉스에서이 메시지를 보여주고 내가 less feed.xml
을하려고 12메가바이트 .If입니다 9백80메가바이트와 리눅스입니다.
"feed.xml" may be a binary file. See it anyway?
나는 헤더를 설정하려고 시도했지만이 같은 응답은 전체 파일을 다운로드하지 못했습니다.
wget -S --header="Accept-Encoding: gzip" 'http://www2.xyz.com'
Connecting to www2.XYZ.com|***.**.**.**|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx/1.2.3
Date: Wed, 24 Dec 2014 03:50:51 GMT
Content-Type: text/xml
Content-Length: 12252156
Connection: keep-alive
X-Powered-By: PHP/5.3.13
Expires: Mon, 1 Jan 2000 00:00:00 GMT
Content-encoding: gzip
Content-disposition: attachment; filename="feeds.xml";
Length: 12252156 (12M) [text/xml]
어떻게하면이 문제를 해결할 수 있으며 Linux에서 feed.xml을 다운로드 할 수 있습니다. 도움을 청하십시오.
:
하거나 gzcat이없는 경우? –
제대로 문제없이 Windows에 다운로드되며 파일도 열 수 있습니다. – Sthita
일관성을 유지하십시오. 제목에 feed.xml이 있지만 코드에는 abc.xml과 feed.php가 나와 있습니다. 행운을 빕니다. – shellter