title: How to validate HTTP request headers before receiving request body using WCF
body: <p>I'm implementing a REST service using WCF which will be used to upload very large files.  The HTTP headers in this request will communicate information which will be validated prior to allowing the upload to proceed (things like permissions, available disk space, etc).  It's possible this validation will fail resulting in an error response.  I'd like to do this validation prior to the client sending the body of the request, so it has a chance to detect failure before uploading potentially gigabytes of data.</p>
  
  <p>RESTful web services use the HTTP 1.1 <code>Expect: 100-continue</code> in the request to implement this.  For example Amazon S3's REST API can validate your key and ACLs in response to an object <code>PUT</code> operation, returning <code>100 Continue</code> if all is well, indicating you may proceed to send your data.</p>
  
  <p>I've rummaged around the WCF documentation and I just can't see a way to accomplish this without doing some pretty low-level hooking into the HTTP request processing pipeline.  How would you suggest I solve this problem?</p>