Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007397 [Squeak Packages] KomHttpServer major always 09-24-09 07:45 09-24-09 07:45
Reporter gherolyants View Status public  
Assigned To gcorriga
Priority normal Resolution open  
Status assigned  
Summary 0007397: Handling files on Windows is broken.
Description I use the following script (in Pharo) to start Seaside, allowing Kom server handle static files.

| ma seaside vmDir |

vmDir := FileDirectory on: SmalltalkImage current vmPath.

"Kill all existing Kom HTTP servers"
HttpService allInstancesDo: [:each | each stop. each unregister].

"Start a new server on port 9090 servering both static content and seaside apps"
seaside := WAKomEncoded default.
ma := ModuleAssembly core.
ma serverRoot: vmDir fullName.
ma alias: '/seaside' to: [ma addPlug: [:request | seaside process: request]].
ma documentRoot: (vmDir directoryNamed: 'files') fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 9090 named: 'httpd') plug: ma rootModule.

I'm on Windows and the full path to the 'files' directory is (for example): C:\work\myproject\files. When I try to load style.css file placed in this directory, I get an:

Internal Server Error
MessageNotUnderstood: OpaqueURI>>extension

It happens because MIME type guessing algorithm treats "C:" as URI schema. And URI class suggested is OpaqueURI instead of HierarchicalURI.

The attachment contains fix that works on Windows (and should work on other systems too, I guess).
Additional Information OS: Windows Vista x64 Home Basic
Pharo: Pharo1.0beta Latest update: #10451.
Attached Files [^] (247 bytes) 09-24-09 07:45

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
09-24-09 07:45 gherolyants New Issue
09-24-09 07:45 gherolyants Status new => assigned
09-24-09 07:45 gherolyants Assigned To  => gcorriga
09-24-09 07:45 gherolyants File Added:
09-24-09 07:46 gherolyants Issue Monitored: gherolyants
09-24-09 07:46 gherolyants Issue End Monitor: gherolyants

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
37 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker