+1

Supun..

On Sun, Mar 21, 2010 at 8:34 AM, Sanjiva Weerawarana <[email protected]> wrote:
> POST and PUT are required to have a content type as they have entity bodies.
> So its only for HEAD/GET and those two should be able to share one default
> as they have similar behavior.
> So IMO we can manage with one! In any case, I suggest we start with one and
> get more complicated only if the we run into trouble.
> Sanjiva.
>
> On Sun, Mar 21, 2010 at 8:28 AM, Supun Kamburugamuva <[email protected]> wrote:
>>
>> Having a default builder may solve the problem partially. In HTTP case
>> we have four types of requests. For example for POST requests and GET
>> requests, we may need to default to different builders.
>>
>> Thanks,
>> Supun..
>>
>> On Sat, Mar 20, 2010 at 5:38 PM, Supun Kamburugamuva <[email protected]>
>> wrote:
>> > +1, for making the default builder configurable.
>> >
>> > Thanks,
>> > Supun..
>> >
>> > On Sat, Mar 20, 2010 at 3:08 PM, Sanjiva Weerawarana <[email protected]>
>> > wrote:
>> >> On Sat, Mar 20, 2010 at 2:48 PM, Supun Kamburugamuva <[email protected]>
>> >> wrote:
>> >>>
>> >>> Yes I was missing something :). If the content type is null for a GET
>> >>> request, it is default to application/x-www-form-urlencoded in  the
>> >>> org.apache.axis2.transport.http.util.RESTUtil.java.
>> >>>
>> >>> if (contentType == null || "".equals(contentType)) {
>> >>>    contentType = HTTPConstants.MEDIA_TYPE_X_WWW_FORM;
>> >>> }
>> >>
>> >> Well that may work but its wrong :-). GET (or any HTTP request that has
>> >> no
>> >> entity body) is not required to have a content type and does not have a
>> >> content type.
>> >> So we should fix it properly by having the default builder notion ..
>> >> not a
>> >> default content type concept.
>> >> Sanjiva.
>> >> --
>> >> Sanjiva Weerawarana, Ph.D.
>> >> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>> >> email: [email protected]; phone: +1 408 754 7388 x51726; cell: +94 77
>> >> 787
>> >> 6880
>> >> blog: http://sanjiva.weerawarana.org/
>> >>
>> >> Lean . Enterprise . Middleware
>> >>
>> >> _______________________________________________
>> >> Carbon-dev mailing list
>> >> [email protected]
>> >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>
>> >>
>> >
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: [email protected]; phone: +1 408 754 7388 x51726; cell: +94 77 787
> 6880
> blog: http://sanjiva.weerawarana.org/
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>

_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to