[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-06-12 Thread Dana Florescu
** Changed in: zorba
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Fix Released

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-25 Thread Paul J. Lucas
** Changed in: zorba
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread David Graf
** Attachment added: test.xq
   https://bugs.launchpad.net/bugs/1002867/+attachment/3157878/+files/test.xq

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  New

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Paul J. Lucas
The query imports base64, but it's not used explicitly anywhere. How
does the query know to output in base64?

** Changed in: zorba
   Status: New = Opinion

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Opinion

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread David Graf
 The query imports base64, but it's not used explicitly anywhere.
Sorry, my fault. I forgot to remove the unused module.

 How does the query know to output in base64?
I do not really understand. The results of file:read-binary and 
http-client:send-request($request)[2]  are base64 items. Therefore, the query 
outputs base64, no?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Opinion

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Paul J. Lucas
Why should the results be base64 items? The results should be raw binary
data. If printed to a terminal, I should expect to get what looks like
garbage but is in fact the raw binary data.  base64 is a TEXT
representation of binary data.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Opinion

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread David Graf
The default serialization of zorba is XML (I guess). Therefore, it
cannot return binary data. Therefore, it returns the base64 string. I
think zorba doesn't have an option to use binary serialization. Right?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  Opinion

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Paul J. Lucas
** Changed in: zorba
   Status: Opinion = In Progress

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Paul J. Lucas
I figured out part of the problem. The HTTP spec says that the default
character encoding is ISO 8859-1, so in my previous change, I always set
the character encoding to that.  If you specify an override-media-type
such as application/octet-stream but do NOT include a character
encoding, it therefore defaults to ISO 8859-1 that, in this case, is
wrong.  The bytes need to pass through untouched.

I therefore think I need to make it so that if you provide NO
charset=... in the override-media-type, then the character encoding
shall remain empty and no transcoding will take place.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Paul J. Lucas
** Branch linked: lp:~paul-lucas/zorba/bug-1002867

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1002867] Re: resulting base64 in http-client is wrong

2012-05-22 Thread Matthias Brantner
@David: I don't think we should call the concept of decoding
base64Binary a serialization method. IMHO, decoding doesn't have
anything to do with the serializer. It's an orthogonal concept. For
example, the file module provides file:write-binary functions that
implicitly decode base64Binary items.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1002867

Title:
  resulting base64 in http-client is wrong

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  I am having a query (see attachment) which imports the same image with
  the file and the http-client module. Unfortunately, the resulting
  base64 values are different. The file module works properly. The
  imported base64 string is correct. But the one coming from the http-
  client module is broken.

  Before running the query, you need to download the image file into the
  directory where the query is located. e.g. wget
  http://dl.dropbox.com/u/1004639/square.png.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1002867/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp