Apache2范围上传(PUT)HTTP 204无内容

时间:2015-12-11 16:56:25

标签: apache header range webdav put

我在Ubuntu上安装Apache 2.4.7并试图上传用"范围x-x"分区的文件。报头中。

func beginSession() { do{ try captureSession.addInput(AVCaptureDeviceInput(device: captureDevice)) if let previewLayer = AVCaptureVideoPreviewLayer(session: captureSession){ self.view.layer.addSublayer(previewLayer) previewLayer.frame = self.view.layer.frame captureSession.startRunning() } } catch let error as NSError { print("error: \(error.localizedDescription)") } } func processPixelBuffer(pixelBuffer: CVImageBufferRef) { let bytesPerRow = CVPixelBufferGetBytesPerRow(pixelBuffer); // Get the pixel buffer width and height let width = CVPixelBufferGetWidth(pixelBuffer); let height = CVPixelBufferGetHeight(pixelBuffer); let pixels = UnsafeMutablePointer<UInt8>(CVPixelBufferGetBaseAddress(pixelBuffer)) let bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.PremultipliedLast.rawValue) let context = CGBitmapContextCreate(UnsafeMutablePointer(pixel), 1, 1, 8, 4, colorSpace, CGImageAlphaInfo.PremultipliedLast.rawValue) let total = width * height; var light=0 // ?? CVPixelBufferUnlockBaseAddress( pixelBuffer, 0 ); } func captureOutput(captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, fromConnection connection: AVCaptureConnection!) { if let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer){ /*Lock the image buffer*/ CVPixelBufferLockBaseAddress(imageBuffer,0); /*Get information about the image*/ processPixelBuffer(imageBuffer) } } mod_dav已启用。 webdav目录还有&#34; Header Content范围字节&#34;已启用PUT范围请求。

我不知道我是否应该进行更多配置,但是当我进行后续范围PUT时,这就是我得到的:

mod_headers

我得到了PUT /webdav/header4/header4_201_1400000.ismv HTTP/1.1\r\n Range: bytes=0-667\r\n Content-Length: 667\r\n HTTP/1.1 201 Created\r\n Location: http://10.168.200.94/webdav/header4/header4_201_1400000.ismv\r\n Accept-Ranges: bytes\r\n Content-Length: 71\r\n PUT /webdav/header4/header4_201_1400000.ismv HTTP/1.1\r\n Range: bytes=667-4498\r\n Content-Length: 3831\r\n HTTP/1.1 204 No Content\r\n Content-Length: 0\r\n ,好像文件被覆盖但没有附加。

0 个答案:

没有答案