[ckan-dev] Mysterious bugfix in webstore-client

Tim McNamara tim.mcnamara at okfn.org
Wed Jul 20 20:28:15 UTC 2011


How did you debug this/identify the problem? Would be good to know the
original data & request made.

Of your proposed causes, I would say it's likely to be 1 or 4. I expect 1 is
the cause, as  encoding issues between UTF-8 characters and bytes can be
tricky (http://bugs.python.org/issue11082).

On 21 July 2011 08:13, Friedrich Lindenberg
<friedrich.lindenberg at okfn.org>wrote:

> Hi all,
>
> I've just made this [1] bugfix related to uploading content as JSON to
> the webstore via httplib.HTTPConnection. The problem manifests itself
> in that the content-length header sent to the server is two bytes
> short. I have no clue what problem this fixes and if it actually fixes
> the problem for all cases or will come back to haunt us. I'd be very
> grateful if the Python-gurus here could spend a few moments to help me
> understand:
>
> - Is this an encoding bug?
> - Is it related to JSON?
> - Is it related to HTTP PUT?
> - Could it be newlines?
>
> Thanks for any input.
>
> - Friedrich
>
> [1]
> https://github.com/okfn/webstore-client/commit/2d7af09102f8ce4606fc69843aa03a2fbc33d000
> --
> Open Knowledge Foundation
> Promoting Open Knowledge in a Digital Age
> http://www.okfn.org/ - http://blog.okfn.org/
>
> http://twitter.com/pudo
> http://pudo.org
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110721/33c75f81/attachment-0001.html>


More information about the ckan-dev mailing list