Comments (8)
I haven't seen it before, but I will check it out. Might be a bug in the static handler
Sent from my iPhone
On Nov 16, 2013, at 9:36 AM, Brent Anderson [email protected] wrote:
package main
import "github.com/codegangsta/martini"
func main() {
m := martini.Classic()
m.Get("/", func() string {
return "Hello world!"
})
m.Run()
}
Building, running and then browsing :3000 initiates a download of the built executable (5.3MB). Changing the path to '/test' and browsing :3000/test will return "Hello world!". This is on OSX Mavericks and tested with Go 1.1 and Go 1.2.Running the default net/http server example on :3000 work just fine.
This is pretty bizarre behavior. Have you seen it before?
—
Reply to this email directly or view it on GitHub.
from martini.
Looking into this now
from martini.
I am not able to reproduce this with the latest version of martini (af1b7cc). This does seem like very odd behavior, and very insecure. If you could give me a little more information (log output, sample program, test case) it would be greatly appreciated
from martini.
is the binary named public
by any chance. e.g. you put main.go
in a directory called public
and then called go build
or used a tool that does to run it
from martini.
Hah, yeah that would be the only thing I can think of at the moment
On Sat, Nov 16, 2013 at 10:55 AM, DisposaBoy [email protected]:
is the binary named public by any chance. e.g. you put main.go in a
directory called public and then called go build or used a tool that does
to run it—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-28633127
.
from martini.
@DisposaBoy, exactly! I had thought about this but only tested by installing and running the binary from bin
rather than renaming the directory; not the right test. @codegangsta, I'll rename my folder for now. Not sure if there's much else you can do about it.
from martini.
@brentmn Not to much to do except documentation. Closing this issue out
from martini.
I would consider removing the default static folder or allowing it to be overwritten when calling martini.Static(...)
from martini.
Related Issues (20)
- Does martini really support html5 Mode serving of static files? HOT 1
- Why HEAD method called on Get Routing?
- Link broken HOT 1
- Handling Gorilla Websockets
- Website hacked? HOT 1
- Wrong link? http://martini.codegangsta.io shows online gambling advertisement only HOT 1
- Use render.Render in ReturnHandler
- unit
- Unit Test
- Add support for promhttp HOT 2
- Hook to log errors if status code > 399 HOT 1
- typecheck arguments on boot-up
- How to include auth middleware that handles roles for logged-in users HOT 1
- cannot set headers HOT 1
- how to break-out of middleware chain using Martini HOT 2
- Problems with # in route matching HOT 1
- Contribution, Arabic translation
- How to become a maintainer?
- is this project dead? HOT 2
- Football
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from martini.