GithubHelp home page GithubHelp logo

scgi-transport's People

Contributors

dependabot[bot] avatar elegant996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

isgasho alch-emi

scgi-transport's Issues

Handle a response that does not begin with headers

First, thanks for writing this module! I think for some users (I know one) your work will finally put Caddy on par with Nginx.

Right now the module expects the response to begin with headers:

scgi-transport/client.go

Lines 172 to 176 in 826f05d

// Parse the response headers.
mimeHeader, err := tp.ReadMIMEHeader()
if err != nil && err != io.EOF {
return
}

However, the SCGI spec does not mandate this. It says,

The format of the response is not specified by this protocol.

It practice, SCGI server implementation like the Wapp web framework often respond with a status line first (like HTTP/1.1 200 OK), which makes them incompatible with the module. Could you handle this case?

Updates after Caddy v2.4.0 is released

This is just an FYI, we've recently merged some changes that will land in v2.4.0 that change a bit how you should invoke the Caddyfile unmarshaler for the rpHandler.

caddyserver/caddy@e4a22de#diff-6672fa0777d0d187809940a7d14eadf14ad36e4206c77f19822c67b668f1084c

In particular, you should add this bit of code after rpHandler.UnmarshalCaddyfile(dispenser)

	err = rpHandler.FinalizeUnmarshalCaddyfile(h)
	if err != nil {
		return nil, err
	}

This makes the new handle_response feature parse correctly.

(As an aside, just out of curiosity, what do you use SCGI for? What language/scgi server do you use it with? I've never used the protocol myself)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.