vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Variable HTTPFileServerSettings.preWriteCallback

Called just before headers and data are sent. Allows headers to be customized, or other custom processing to be performed.

class HTTPFileServerSettings
{
  // ...
  @safe void delegate(scope HTTPServerRequest, HTTPServerResponse, ref string) preWriteCallback = null;
  // ...
}

Note

Any changes you make to the response, physicalPath, or anything else during this function will NOT be verified by Vibe.d for correctness. Make sure any alterations you make are complete and correct according to HTTP spec.

Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.