Yes, your solution is good.<br><br>Maybe we can check that every server and proxy handle error like this.<br><br>Now :<br><br>ERROR HANDLING<br>==============<br>1 ) Download the response as binary.<br><br>2) Try to parse as Menu => if Menu with first node as '3' error type => ERROR<br>
<br>3) else it's OK<br><br>2 importants things<br>=> A '3' error node MUST be at first place if the response is ERROR<br>=> A '3' node MUST be present ONLY in response menu after an error.<br><br>
<div class="gmail_quote">2012/5/11 Wolfgang Faust <span dir="ltr"><<a href="mailto:wolfgangmcq@gmail.com" target="_blank">wolfgangmcq@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div class="im">On Fri, May 11, 2012 at 7:59 AM, Damien Carol <span dir="ltr"><<a href="mailto:damien.carol@gmail.com" target="_blank">damien.carol@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

My crawler use this algorithm for Menu :<br><br>1 ) just download the response as binary.<br><br>2) If the response is small size => parse as Menu with '3' node => ERROR<br></blockquote></div><div>What if the binary document is small? Or if the server sends a long error message with, say, a stack trace? <br>

</div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>3) else it's OK<br><br>I think the way floodgap manage non existant path is good. (GOGOPH Server do the same)<br>


<br>2 importants things <br>=> '3' node MUST be present ONLY in response menu after an error.<br>=> if the size of response is small, client SHOULD try to parse response as Menu to check '3' error nodes<br>


<br>Tell your opinions all !<div><div><br></div></div></blockquote></div><div>I think that the client should attempt to parse it as a menu, and if the first item is a valid '3' itemtype, consider it an error. <br>

</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br><div class="gmail_quote">2012/5/11 Kim Holviala <span dir="ltr"><<a href="mailto:kim@holviala.com" target="_blank">kim@holviala.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, 10 May 2012, 06:01:25 EEST, Driedfruit <<a href="mailto:driedfruit@mindloop.net" target="_blank">driedfruit@mindloop.net</a>> wrote:<br>
<br>
> It seems to me, that servers either return errors via gopher menus,<br>
> either as plain-text. Is that behavior correct?<br>
><br>
> gopher://<a href="http://floodgap.com/0/non-existant-path" target="_blank">floodgap.com/0/non-existant-path</a><br>
> gopher://<a href="http://floodgap.com/1/non-existant-path" target="_blank">floodgap.com/1/non-existant-path</a><br>
><br>
> Plain-text files couldn't be parsed as gopher menus and vice versa, so<br>
> in either case the resulting output is flawed. Yet the response for the<br>
> 2 queries above is the same.<br>
><br>
> So what's the deal here?<br>
<br>
</div>The server doesn't know what filetype the client is requesting (it's not part of the request string). Gophernicus tries to guess, sometimes correctly, while most other servers won't even try (which really isn't any worse, just different).<br>



<br>
Gopher errors are just broken, plain and simple.<br>
<span><font color="#888888"><br>
- Kim<br>
</font></span><div><div><br>
<br>
<br>
_______________________________________________<br>
Gopher-Project mailing list<br>
<a href="mailto:Gopher-Project@lists.alioth.debian.org" target="_blank">Gopher-Project@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Damien CAROL<br>
<a href="gopher://dams.zapto.org/1/" target="_blank">gopher://dams.zapto.org/1/</a><br>
</font></span><br>_______________________________________________<br>
Gopher-Project mailing list<br>
<a href="mailto:Gopher-Project@lists.alioth.debian.org" target="_blank">Gopher-Project@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project</a><br></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><br>-- <br>
01010111 01101111 01101100 01100110<br>
</font></span><br>_______________________________________________<br>
Gopher-Project mailing list<br>
<a href="mailto:Gopher-Project@lists.alioth.debian.org">Gopher-Project@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project</a><br></blockquote></div><br><br clear="all"><br>-- <br>
Damien CAROL<br>
<a href="gopher://dams.zapto.org/1/" target="_blank">gopher://dams.zapto.org/1/</a><br>