lib/fakes3/server.rb in fakes3-0.1.7 vs lib/fakes3/server.rb in fakes3-0.2.0

- old
+ new

@@ -48,10 +48,17 @@ @hostname = hostname @port = server.config[:Port] @root_hostnames = [hostname,'localhost','s3.amazonaws.com','s3.localhost'] end + def validate_request(request) + req = request.webrick_request + return if req.nil? + return if not req.header.has_key?('expect') + req.continue if req.header['expect'].first=='100-continue' + end + def do_GET(request, response) s_req = normalize_request(request) case s_req.type when 'LIST_BUCKETS' @@ -376,9 +383,11 @@ when 'POST' normalize_post(webrick_req,s_req) else raise "Unknown Request" end + + validate_request(s_req) return s_req end def dump_request(request)