GET /path/to/program?which=84 HTTP/1.1
Host: domain.tld
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-TT,en;q=0.8
Range: bytes=4445184-4446207
If-Range: "423c76-13c625b-514e00a6256c0"
Read HTTP request headers
-
- New User
- Posts: 2
- Joined: Wed Sep 03, 2014 9:39 am
- First Name: Musa
- Last Name: Mitchell
- Company Name: Guardian General Insurance
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Contact:
Read HTTP request headers
I'd like to serve 206 partial requests, from a rpgsp program. Is there a way to read the Range header to get the bytes range of the content to serve?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Read HTTP request headers
It should be in the HTTP_RANGE environment variable. So, in RPGsp you can just do something like:
Code: Select all
myvar = RPGspIn('HTTP_RANGE': 'Env');
-
- New User
- Posts: 2
- Joined: Wed Sep 03, 2014 9:39 am
- First Name: Musa
- Last Name: Mitchell
- Company Name: Guardian General Insurance
- State / Province: Outside Canada/USA
- Country: Trinidad and Tobago
- Contact:
Re: Read HTTP request headers
That works, thanks.
Who is online
Users browsing this forum: No registered users and 2 guests