https://issues.shibboleth.net/jira/browse/CPPXT-90
[shibboleth/cpp-xmltooling.git] / xmltooling / io / GenericRequest.h
index 11cd82b..ff24bdb 100644 (file)
@@ -85,6 +85,13 @@ namespace xmltooling {
         virtual int getPort() const=0;
 
         /**
+         * Returns true iff the request port is the default port for the request protocol.
+         *
+         * @return  default port indicator
+         */
+        virtual bool isDefaultPort() const;
+
+        /**
          * Returns the MIME type of the request, if known.
          *
          * @return the MIME type, or an empty string
@@ -165,6 +172,13 @@ namespace xmltooling {
             getClientCertificates() const=0;
 
         /**
+         * Converts a relative URL into an absolute one based on the properties of the request.
+         *
+         * @param url   input URL to convert, will be modified in place
+         */
+        virtual void absolutize(std::string& url) const;
+
+        /**
          * Returns a language range to use in selecting language-specific
          * content for this request.
          * <p>The syntax is that of the HTTP 1.1 Accept-Language header, even