bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] An option to save error pages


From: Darshit Shah
Subject: Re: [Bug-wget] An option to save error pages
Date: Sun, 24 Mar 2013 00:11:14 +0530

A generic --force option you mean?
Force is a common switch in most applications. In fact, if you are so
intent on getting that information, use the --debug option. It prints this
data along with the other header information, etc.

For e.g.:

> wget -d www.google.com/asdfghj
> ... [Extra Data snipped]
> ---response begin---
> HTTP/1.1 404 Not Found
> Content-Type: text/html; charset=UTF-8
> X-Content-Type-Options: nosniff
> Date: Sat, 23 Mar 2013 18:38:02 GMT
> Server: sffe
> Content-Length: 938
> X-XSS-Protection: 1; mode=block
>
> ---response end---
> 404 Not Found
> Registered socket 3 for persistent reuse.
> URI content encoding = ‘UTF-8’
> Skipping 938 bytes of body: [<!DOCTYPE html>
> <html lang=en>
>   <meta charset=utf-8>
>   <meta name=viewport content="initial-scale=1, minimum-scale=1,
> width=device-width">
>   <title>Error 404 (Not Found)!!1</title>
>   <style>
>     *{margin:0;padding:0}html,code{font:15px/22px
> arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7%
> auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* >
> body{background:url(//www.google.com/images/errors/robot.png) 100% 5px
> no-repeat;padding-right:205px}p{margin:11px 0 22px;overfloSkipping 426
> bytes of body: [w:hidden}ins{color:#777;text-decoration:none}a
> img{border:address@hidden screen and
> (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
>   </style>
>   <a href=//www.google.com/><img src=//
> www.google.com/images/errors/logo_sm.gif alt=Google></a>
>   <p><b>404.</b> <ins>That’s an error.</ins>
>   <p>The requested URL <code>/asdfghj</code> was not found on this
> server.  <ins>That’s all we know.</ins>
> ] done.
> 2013-03-24 00:08:04 ERROR 404: Not Found.
>



On Sun, Mar 24, 2013 at 12:03 AM, CCC DDD <address@hidden> wrote:

> An option for wget to download content after non-200 HTTP code would be
> very useful.
>
> For example, a HTTP/1.x 404 NOT FOUND response with nicely-formatted
> custom "404 page" HTML in the response body. Or a 502 error that generates
> a detailed page with diagnostic information. Additionally badly written php
> code will sometimes generate bogus 404 codes even though the content is
> available.
>
> Most browsers will display this content to the user, but there is
> currently no way to make wget download it. As these pages often contain
> very useful information, it would be nice to have a "--save-even-if-error"
> option
>
> Thank you
>



-- 
Thanking You,
Darshit Shah
Research Lead, Code Innovation
Kill Code Phobia.
B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani


reply via email to

[Prev in Thread] Current Thread [Next in Thread]