Skip to content
This repository was archived by the owner on May 17, 2025. It is now read-only.
This repository was archived by the owner on May 17, 2025. It is now read-only.

browser return application/octet-stream (0 byte) when url TrailingSlash  #24

@tablecell

Description

@tablecell
package main

import (
	"bytes"
 	"github.com/aofei/air"
 )

var a = air.Default

func identicon(req *air.Request, res *air.Response) error {
 	return res.Write(bytes.NewReader(req.ParamValue("Name").Bytes()))
}
func main() {
	a.DebugMode = true
 
	a.GET("/identicons/:Name", identicon)
	a.Serve() //8080 
}

visit http://localhost:8080/identicons/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions