users@jersey.java.net

[Jersey] Re: Base64 encoding problem

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Fri, 07 Oct 2011 20:24:13 +0200

ah, makes sense, I recall some major changes (rewrite) of base64
encoding impl in the past.. Ok, good to know that it works for you now.

Pavel

On 10/7/11 8:12 AM, Frederic Bergeron wrote:
> Hi Pavel,
>
> Thanks for your quick reply. I have found the problem. I was using
> another software component that was dependent on a very old version of
> Jersey so that I had 2 sets of Jersey jar files in my classpath. The
> old version was loaded first and it was apparently buggy. It seems to
> work fine if I remove the old set of Jersey files.
>
> Regards,
>
> Frederic Bergeron
> ===============================
> *From:* Pavel Bucek <pavel.bucek_at_oracle.com>
> *To:* users_at_jersey.java.net
> *Sent:* Friday, October 7, 2011 1:35 AM
> *Subject:* [Jersey] Re: Base64 encoding problem
>
> Hello Frederic,
>
> it might be related to http://java.net/jira/browse/JERSEY-784
>
> I should be able to investigate it fully next week, so stay tuned
> (almost whole jersey team is in transit right now - returning from J1).
>
> Regards,
> Pavel
>
> On 10/6/11 5:05 AM, Frederic Bergeron wrote:
>> Hi,
>>
>> I have a strange bug and I'm wondering if anyone has an idea about it.
>>
>> I'm using a Jersey client (via an instance of fedora-client) to
>> interoperate with a RESTful server. However, for some reason, the
>> client cannot authenticate itself successfully. Using an HTTP
>> monitor, I can see the problem. The base64-encoded credentials data
>> sent by the client is incorrect. The expected base64-encoded string is:
>>
>> ZmVkb3JhQWRtaW46ZmVkb3JhQWRtaW4=
>>
>> but the client sends rather
>>
>> ZmVkb3JhQWRtaW46ZmVkb3JhQWRtaW4A
>>
>> The username and password that I use are both fedoraAdmin, i.e., the
>> base64-encoded string is "fedoraAdmin:fedoraAdmin" (without the quotes).
>>
>> I've tried to make a simple example to isolate the bug but I'm unable
>> to reproduce it :-(
>>
>> Any idea of what could cause the problem?
>>
>> Frederic Bergeron
>>
>
>
>