Fixed in FOP Trunk (hopefully):
http://svn.apache.org/viewvc?view=rev&rev=537120

Thanks for spotting the problem.

On 10.05.2007 16:20:04 jelka.kosir wrote:
> Similar to my previous mail I have a problem retrieving images from a 
> database that uses basic authentication.
> 
> Looking at the code I think the problem is again in the EBCDIC codepage 
> that is used on the server.
> 
> The problem is bolded:
> 
> protected void applyHttpBasicAuthentication(URLConnection connection, 
>             String username, String password) {
>         String combined = username + ":" + password;
>         try {
>             ByteArrayOutputStream baout = new 
> ByteArrayOutputStream(combined.length() * 2);
>             Base64EncodeStream base64 = new Base64EncodeStream(baout);
>             base64.write(combined.getBytes());
>             base64.close();
>             connection.setRequestProperty("Authorization", 
>                     "Basic " + new String(baout.toByteArray()));
>         } catch (IOException e) {
>             //won't happen. We're operating in-memory.
>             throw new RuntimeException("Error during base64 encodation of 
> username/password");
>         }
>     }
> 
> This function is defined in: 
> src\java\org\apache\fop\apps\FOURIResolver.java
> 
> I will try with base64.write(combined.getBytes("UTF-8"));
> 
> Will keep you posted.
> 
> Jelka



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to