Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

nex3 opened this issue Nov 11, 2013 · 17 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@nex3
Copy link
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.

@nex3
Copy link
Member Author

nex3 commented Dec 12, 2013

Issue #15622 has been merged into this issue.

@jmesserly
Copy link

also directory listing :)


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

@munificent
Copy link
Member

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?

@nex3
Copy link
Member Author

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.

@munificent
Copy link
Member

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

@munificent
Copy link
Member

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

@munificent
Copy link
Member

Marked this as blocking #15859.

@munificent
Copy link
Member

Unmarked this as blocking #15859.

@munificent
Copy link
Member

Marked this as blocking #15830.

@sethladd
Copy link
Contributor

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?

@sethladd
Copy link
Contributor

sethladd commented Jan 8, 2014

cc @kevmoo.

@nex3
Copy link
Member Author

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?

@munificent
Copy link
Member

Added DevStory label.

@nex3
Copy link
Member Author

nex3 commented Jan 31, 2014

Issue #16438 has been merged into this issue.

@nex3
Copy link
Member Author

nex3 commented Feb 11, 2014

Set owner to @nex3.
Added Started label.

@nex3
Copy link
Member Author

nex3 commented Feb 12, 2014

Fixed by r32615.


Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

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

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants