eclipse-archived / californium.core

Californium project
86 stars 69 forks source link

Compare mime types directly in HttpTranslator #31

Closed plemarquand closed 9 years ago

plemarquand commented 9 years ago

When translating HTTP requests in the proxy, if the contentType was created via ContentType.parse the charset of the translated request would always be modified to be ISO_8859_1 even if the content type was application/json. The newly created content type was compared to the existing static instance using object equality instead of .equals().

Fixes the issue by comparing mime types directly.

plemarquand commented 9 years ago

I've signed the CLA (https://projects.eclipse.org/users/paul-lemarquand-0/cla), not sure why validation is failing.

sophokles73 commented 9 years ago

Hi Paul,

thanks for finding this bug and providing a fix and sorry for getting to you so late :-) I have manually validated your email address and eclipse indeed seems to have a CLA on record for it. Is it possible that you signed the CLA only after you created the PR? The webmasters also did some work on the CLA validation mechanism recently so simply re-creating the PR might do the trick. If it is not too much effort, could you try that?

plemarquand commented 9 years ago

@sophokles73 I'll try closing this request and opening a new one.

plemarquand commented 9 years ago

@sophokles73 Created #32. Looks like it validated and all is :ok: