xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jelka.ko...@atol.si
Subject Re: Bug report - URIResolver and basic authentication working incorrect when EBCDIC codepage is used
Date Wed, 16 May 2007 07:09:52 GMT
I did manage to test the correction (fop trunk) on the IBM machine with 
ebcdic and images now work.

As far as I know the bug I reported is fixed.

Thank you for your help!

Jelka





Jeremias Maerki <dev@jeremias-maerki.ch> 
11.05.2007 09:14
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
Re: Bug report - URIResolver and basic authentication working incorrect 
when EBCDIC codepage is used






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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



Mime
View raw message