geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Help needed on http methods and regular expressions
Date Thu, 04 Jan 2007 21:27:24 GMT
Chris Cardona has been trying to test the jacc 1.1 extended http- 
method support by deploying slide (GERONIMO-1747) and I don't know  
enough about regular expressions to see where the problem is.

The http 1.1 spec says:

(5.1.1)       extension-method = token

(2.2)

        token          = 1*<any CHAR except CTLs or separators>
        separators     = "(" | ")" | "<" | ">" | "@"
                       | "," | ";" | ":" | "\" | <">
                       | "/" | "[" | "]" | "?" | "="
                       | "{" | "}" | SP | HT

        CHAR           = <any US-ASCII character (octets 0 - 127)>

        CTL            = <any US-ASCII control character
                         (octets 0 - 31) and DEL (127)>

I think this means a hyphen is allowed in an extension-method.

The web-app 2.5 schema says:

   <xsd:simpleType name="http-methodType">
     <xsd:annotation>

       <xsd:documentation>

	A HTTP method type as defined in HTTP 1.1 section 2.2.

       </xsd:documentation>
     </xsd:annotation>

      <xsd:restriction base="xsd:token">
          <xsd:pattern value="[\p{L}-[\p{Cc}\p{Z}]]+"/>
      </xsd:restriction>

   </xsd:simpleType>

I have roughly no clue what that means.

Xmlbeans is complaining:

cvc-datatype-valid.1.1: string value 'VERSION-CONTROL' does not match  
patter
n for http-methodType in namespace http://java.sun.com/xml/ns/javaee,  
error: cvc
-datatype-valid.1.1: string value 'BASELINE-CONTROL' does not match  
pattern for
http-methodType in namespace http://java.sun.com/xml/ns/javaee]

I see 3 possiblilites:

1. I'm wrong and http 1.1 spec does not allow hyphens in extension  
methods
2. sun is wrong and the regexp in http-methodType means something  
other than the definition in the http 1.1 spec
3. xmlbeans is wrong and is not interpreting the regexp in the schema  
correctly.

Anyone have a clue?
Help!

thanks
david jencks


Mime
View raw message