What is the purpose of having two properties named HTTP_METHOD and HTTP_METHOD_OBJECT? Can't we use HTTP_METHOD in this place instead of HTTP_METHOD_OBJECT?
Thanks, NuwanD. On Wed, Apr 3, 2013 at 7:36 PM, Nuwan Dias <[email protected]> wrote: > Hi, > > When a tenant does a REST invocation with the OPTIONS verb, an NPE is > thrown from the following code block in the MultitenantMessageReceiver. > > try { > String httpMethod = (String) > mainInMsgContext.getProperty(HTTPConstants.HTTP_METHOD); > if (*httpMethod.equals*(Constants.Configuration.HTTP_METHOD_GET) > || > > httpMethod.equals(Constants.Configuration.HTTP_METHOD_DELETE)) { > > > The value of HTTPConstants.HTTP_METHOD = "HTTP_METHOD_OBJECT". > > What happens is that there is no property named HTTP_METHOD_OBJECT in the > message context. However, there is a property named HTTP_METHOD and its > value is "OPTIONS". For the cases of GET, POST, etc, the HTTP_METHOD_OBJECT > is set properly. It does not get set in the OPTIONS case. > > From where does the HTTP_METHOD_OBJECT property get set in the message > context? > > Thanks, > NuwanD. > > -- > Nuwan Dias > > Software Engineer - WSO2, Inc. http://wso2.com > email : [email protected] > Phone : +94 777 775 729 > -- Nuwan Dias Software Engineer - WSO2, Inc. http://wso2.com email : [email protected] Phone : +94 777 775 729
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
