
At 11:18 17/03/04 +0100, Bjorn Bringert wrote:
I have reverted the type of the exported openTCP to String -> IO Connection, it now always uses port 80 like the old version did. Instead there is an internal function openTCPPort that takes a port number. I will try to have a look at the Browser module to see what needs to be done to make it support arbitrary port numbers and if it needs any other updates.
An updated version of HTTP.hs is available at http://www.dtek.chalmers.se/~d00bring/haskell-xml-rpc/HTTP.hs
OK, that works. I just re-ran the HXml Toolbox HUnitExample test successfully, using the new HTTP module (with some further edits) and my new URI module. I also had to apply a small edits to Browser.hs (to include Proxy in the export list). I am finding that there are some (easily fixed) incompatibilities with my revised Network.URI module. (I also note that the HTTP module duplicates the Authority-parsing functionality that is also present in my Network.URI module, but that can be sorted out later.) In my module, I changed the structure of the URI datatype, though I do provide functions to access components with their original names. Unfortunately, the HTTP module makes some use of the "value { component=value }" syntax to define new URI values, which is not compatible. If we are to adopt my version, these instances will need changing. This will, in turn, require some synchronization of the change-over. Here are the differences: [[ Compare: (<)D:\Cvs\DEV\HaskellUtils\Network\HTTP.hs (46201 bytes) with: (>)D:\Cvs\DEV\HaskellUtils\Network\HTTP-bjorn.hs (45931 bytes) 13,15c13 < -- ** Changes by Graham Klyne: < -- - export httpVersion < -- - use new URI module (similar to old, but uses revised URI datatype) --- 85d81 < httpVersion, -- [GK] 498,499c493,494 < alt_uri = show $ if null (uriPath u) || head (uriPath u) /= '/' < then u { uriPath = '/' : uriPath u } ---
alt_uri = show $ if null (path u) || head (path u) /= '/' then u { path = '/' : path u }
985,986c980 < -- r { rqURI = (rqURI r){ scheme = "", authority = "" } } < r { rqURI = (rqURI r){ uriScheme = "", uriAuthority = Nothing } } ---
r { rqURI = (rqURI r){ scheme = "", authority = "" } }
]] My full codebase for HTTP and URI can be seen at: http://www.ninebynine.org/Software/HaskellUtils/Network/ My suggestion would be that we make the change-over by moving these to the library CVS as a single unit. But I guess we should see if the URI changes are going to cause any other similar problems. Do we have a stand-alone test harness for the HTTP code? I've been using the HXml Toolbox unit tests. #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact

Graham Klyne wrote:
I am finding that there are some (easily fixed) incompatibilities with my revised Network.URI module. (I also note that the HTTP module duplicates the Authority-parsing functionality that is also present in my Network.URI module, but that can be sorted out later.)
In my module, I changed the structure of the URI datatype, though I do provide functions to access components with their original names. Unfortunately, the HTTP module makes some use of the "value { component=value }" syntax to define new URI values, which is not compatible. If we are to adopt my version, these instances will need changing. This will, in turn, require some synchronization of the change-over.
Great, I wasn't happy about adding the URI authority parsing stuff to HTTP in the first place, but I didn't have your Network.URI module at the time.
My full codebase for HTTP and URI can be seen at: http://www.ninebynine.org/Software/HaskellUtils/Network/
My suggestion would be that we make the change-over by moving these to the library CVS as a single unit. But I guess we should see if the URI changes are going to cause any other similar problems.
I agree. I guess we need to decide how to host this. Make a network module repository at haskell-libs?
Do we have a stand-alone test harness for the HTTP code? I've been using the HXml Toolbox unit tests.
Not that I know of, but it would certainly be a good idea. /Bjorn

At 21:12 22/03/04 +0100, Bjorn Bringert wrote:
My full codebase for HTTP and URI can be seen at: http://www.ninebynine.org/Software/HaskellUtils/Network/ My suggestion would be that we make the change-over by moving these to the library CVS as a single unit. But I guess we should see if the URI changes are going to cause any other similar problems.
I agree. I guess we need to decide how to host this. Make a network module repository at haskell-libs?
I've been given access to replace the module in Network. at: cvs.haskell.org but I'm reluctant to push the changes until we're confident that the changes won't cause unreasonable pain. I'm also waiting for RFC2396bis to be finalized... there are a couple of details that I may need to change. #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact
participants (2)
-
Bjorn Bringert
-
Graham Klyne