Git Product home page Git Product logo

nginx-patches's Introduction

Nginx patches

dav-copy-hardlink

Implements hardlinking in DAV copy instead of real copy.

dav_copy_hardlink on;

per-worker-listener

Implements per worker listeners to make requests to certain nginx worker. This requires accept_mutex off; Does not work on Windows.

worker_processes 5;

events {
    # required by per_worker
    accept_mutex off;
}
...
http {
    ...
    server {
        # usual listener
        listen 80;

        # per-worker listener
        # 1st worker will listen 8000
        # 2nd worker will listen 8001
        # 3rd worker will listen 8002
        # 4th worker will listen 8003
        # 5th worker will listen 8004
        listen 8000 per_worker;
        ...
    }
}

put-range

Implements HTTP Content-Range support in DAV PUT request header. When PUT'ting large files it's now possible to split it into several requests and upload the data simultaneously. The behavior is allowed by HTTP standard but not implemented in nginx by default. However it's up to client to watch the consistency.

location / {
    root /tmp;
    dav_methods PUT;
}

Upload. Assume /tmp/partX are all 100-byte files.

curl -X PUT -H "Content-Range: bytes 100-200/300" --data-binary @/tmp/part2 localhost:8088/testfile 
curl -X PUT -H "Content-Range: bytes 200-300/300" --data-binary @/tmp/part3 localhost:8088/testfile 
curl -X PUT -H "Content-Range: bytes 0-100/300" --data-binary @/tmp/part1 localhost:8088/testfile 

Download

curl localhost:8088/testfile

dav-put-report

Reports upload progress to the client as chunked response. Applied after put-range. Report interval is read from X-Put-Report header.

curl -XPUT -H "X-Put-Report: 500" -H "Content-Range: bytes 100-200/100" --data-binary @/tmp/test localhost:8000/dav/test

nginx-patches's People

Contributors

arut avatar zmousm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.