[Grub-dev] Small error in protocol definition
Bartek Jasicki
thindil2 at gmail.com
Sun Jan 18 20:48:57 UTC 2009
On 2009-01-18, at 21:06:11
Giorgos Logiotatidis <seadog at sealabs.net> wrote:
> On Σαβ, 2009-01-17 at 10:28 +0100, Bartek Jasicki wrote:
> hey,
> I just uploaded some arcs with the corresponding workunits
> that failed (401) with the python client. If you find something wrong
> please let me know!
>
> You can find the files here http://sealabs.net/grub/
>
> Thanks
>
>
Hi
I was check only two first files:
1)
http://sealabs.net/grub/mpetzas.0af11d06714110e28d9907515a189b8b26f01244.arc.gz
2)
http://sealabs.net/grub/mpetzas.133c8d8f7cd9d14c9ea245f28066b7badb542887.arc.gz
In both cases you wrong count length of record (always 1 byte too much):
1) That this looks for server (first address if from workunit, second
from .arc file)
* http://www.geocities.com/interinoscantabria/
http://www.geocities.com/interinoscantabria/ (this is ok)
* http://www.iledelareunion.net/cuisine/
ttp://www.iledelareunion.net/cuisine/ (bad result)
I'm not sure, what can produce this problem, but i see, you don't
decompress site and put compressed data directly to .arc file ;) Try
fix it, maybe this produce problems.
2)This same problem with record length:
* http://www.trafficpayment.com/search.tp?universityId=46
http://www.trafficpayment.com/search.tp?universityId=46 (looks ok)
* http://www.calago.biz/site
ttp://www.calago.biz/site (again bad result)
In this case i see, there no content for record (server not send or
maybe you don't wrote it). If server send only headers, please set that
record as a Grub error (HTTP 500).
Few tips:
- if you write to .arc file as a record length, value from header
content-length send by server - please don't do it. I saw few times like
server send some cosmic values there (for example: record was 1000
length and server sent length: 5000). Better count record length by
bytes wrote to .arc file.
- as i wrote above: always decompress content before you put it to .arc
file. Mostly this mean use gzip or deflate.
- as above: if server send no content, please, wrote to .arc file it as
a HTTP 500 error.
If you still been have problems with .arc files, i made simple program
to check .arc files (of course in Mono ;) Simply there is part of C#
client which check correctness of .arc file). All above tests (and
output) i made with this simple program ;)
http://people.swlabs.org/~bartek/tmp/test.tar.gz
Usage is simple:
mono test.exe path_to_workunit path_to_arc_file
I hope this little help in debugging ;)
Bartek
--
Grub Next Generation: http://grub.org
Mailing List: grub-dev at wikia.com
IRC: #wikia-search at irc.freenode.net
Jabber: thindil at jabberpl.org
More information about the Grub-dev
mailing list