[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: Need a ContentType with a case sensitive mimetype
From:       Oleg Kalnichevski <olegk () apache ! org>
Date:       2018-04-23 14:53:16
Message-ID: 1524495196.22613.2.camel () apache ! org
[Download RAW message or body]

On Mon, 2018-04-23 at 15:24 +0200, Sandra Parsick wrote:
> Hello Mailinglist,
> 
> I have following problem: I use the method "ContentType.create" to
> create a ContentType. The current implementation of this method
> transforms the input mimetype to lower case. One of our clients
> accepts
> only "Content-Type" Header as case-sensitive string. Unfortunately,
> we
> and our customer have no possibilities to change the client
> implementation in this case (some backward compatibilities etc). We
> know
> that this client implementation doesn't follow the RFC spec.
> Nevertheless, I can't use the factory method for creating the
> ContentType. Instead, I have to build the Http Header with a
> StringBuilder. This approach is very error-prone. So my question to
> you
> is, is it possible to add a flag to ContentType factory method to
> avoid
> the lower case transformation? If it's possible, I could prepare a
> Pull
> Request for this issue.
> 
> Best regards,
> 
> Sandra Parsick
> 

Hi Sandra

It, of course, would be possible but would it be wise to drag something
that is clearly not right into a general purpose library? 

In your particular case you might want to create an application
specific copy of ContentType and change its behavior as you deem fit.

Oleg 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic