"pub serve" should support index.html and directory listing #15020

Closed
nex3 opened this Issue Nov 11, 2013 · 17 comments

Comments

Projects
None yet
6 participants
Member

nex3 commented Nov 11, 2013

It's a common convention for servers to serve "/dir/index.html" when a user requests "/dir" or "/dir/". "pub serve" should follow this convention as well.

Member

nex3 commented Dec 12, 2013

Issue #15622 has been merged into this issue.

Member

jmesserly commented Dec 12, 2013

also directory listing :)


Changed the title to: ""pub serve" should support index.html and directory listing".

Member

munificent commented Dec 20, 2013

What semantics do we want here? If you request "foo/bar" that could either be:

  1. Request the asset "bar" in the directory "foo".
  2. Request "index.html" in the directory "foo/bar".

Is the idea that we try 1 and if it fails with an asset not found, we then try 2?

Member

nex3 commented Dec 20, 2013

Implementation-wise, that seems right. Semantically, it's not possible for an asset and a directory named "foo/bar" to exist at the same time.

Member

munificent commented Dec 30, 2013

Removed Type-Defect label.
Added Type-Enhancement label.

Member

munificent commented Jan 6, 2014

Removed Priority-Unassigned label.
Added Priority-Medium label.

Member

munificent commented Jan 8, 2014

Marked this as blocking #15859.

Member

munificent commented Jan 8, 2014

Unmarked this as blocking #15859.

Member

munificent commented Jan 8, 2014

Marked this as blocking #15830.

Member

sethladd commented Jan 8, 2014

How much of a web server is pub serve? (Not rhetorical, I don't understand the scope) We have the http_server package which does virtual directories, index.html resolution, mime types, etc. Is pub serve supposed to provide all those services or could it act as a "filter" or "handler" when a request needs something transformed in real time?

Member

sethladd commented Jan 8, 2014

cc @kevmoo.

Member

nex3 commented Jan 9, 2014

Is pub serve supposed to provide all those services

Ideally we'd like "pub serve" to support index.html and mime types for sure. I'm less keen on virtual directories.

could it act as a "filter" or "handler" when a request needs something transformed in real time?

I'm not sure what this means. Can you give an example?

Member

munificent commented Jan 9, 2014

Added DevStory label.

Member

nex3 commented Jan 31, 2014

Issue #16438 has been merged into this issue.

Member

nex3 commented Feb 11, 2014

Set owner to @nex3.
Added Started label.

Member

nex3 commented Feb 12, 2014

Fixed by r32615.


Added Fixed label.

nex3 self-assigned this Feb 12, 2014

Member

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#716.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment