Skip to content

Exception thrown on Nginx servers #63

@baltauger

Description

@baltauger

Hello!

Running the ufront-hello example on a Nginx server throws the folliwing exception:

uncaught exception: Call to undefined function apache_request_headers()

Called from sys.ufront.web.context.HttpRequest::get_clientHeaders
Called from ufront.remoting.RemotingHandler::handleRequest
Called from ufront.app.HttpApplication::setContentDirectory@326
Called from ufront.app.HttpApplication::executeModules@402
Called from ufront.app.HttpApplication::executeModules
Called from ufront.app.HttpApplication::setContentDirectory@352
Called from tink.core._Future.Future_Impl_::_tryFailingFlatMap@110
Called from tink.core._Future.Future_Impl_::trigger@34
Called from tink.core.FutureTrigger::new@146
Called from tink.core._Future.Future_Impl_::map@34
Called from tink.core._Future.Future_Impl_::gather@18
Called from tink.core._Future.Future_Impl_::flatten@53
Called from tink.core._Future.Future_Impl_::gather@18
Called from tink.core._Future.Future_Impl_::trigger@55
Called from tink.core.FutureTrigger::new@146
Called from tink.core._Future.Future_Impl_::gather@18
Called from tink.core._Future.Future_Impl_::flatten@53
Called from tink.core._Future.Future_Impl_::gather@18
Called from ufront.app.HttpApplication::execute
Called from ufront.app.UfrontApplication::execute
Called from ufront.app.HttpApplication::executeRequest
Called from net.txori.baston.server.Main::main

I tracked this down to the fact that FastCGI is missing an implementation of apache_request_headers, upon which ufront relies in its HttpRequest class.

Defining the function by hand in php before ufront loads works, but I believe that the framework could and should handle this gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions