mirror of
https://github.com/tenox7/wrp.git
synced 2025-01-03 07:29:37 +00:00
version string
This commit is contained in:
parent
253d36e963
commit
9358691ce5
13
wrp.go
13
wrp.go
@ -42,20 +42,23 @@ type Ismap struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ctx context.Context
|
version = "3.0"
|
||||||
cancel context.CancelFunc
|
ctx context.Context
|
||||||
gifmap = make(map[string]bytes.Buffer)
|
cancel context.CancelFunc
|
||||||
ismap = make(map[string][]Ismap)
|
gifmap = make(map[string]bytes.Buffer)
|
||||||
|
ismap = make(map[string][]Ismap)
|
||||||
)
|
)
|
||||||
|
|
||||||
func pageServer(out http.ResponseWriter, req *http.Request) {
|
func pageServer(out http.ResponseWriter, req *http.Request) {
|
||||||
req.ParseForm()
|
req.ParseForm()
|
||||||
u := req.FormValue("url")
|
u := req.FormValue("url")
|
||||||
var istr string
|
var istr string
|
||||||
|
var ion string
|
||||||
var i bool
|
var i bool
|
||||||
if req.FormValue("i") == "on" {
|
if req.FormValue("i") == "on" {
|
||||||
istr = "CHECKED"
|
istr = "CHECKED"
|
||||||
i = true
|
i = true
|
||||||
|
ion = "&i=on"
|
||||||
} else {
|
} else {
|
||||||
istr = ""
|
istr = ""
|
||||||
i = false
|
i = false
|
||||||
@ -102,7 +105,7 @@ func pageServer(out http.ResponseWriter, req *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(out, "No URL or search query specified")
|
fmt.Fprintf(out, "No URL or search query specified")
|
||||||
}
|
}
|
||||||
fmt.Fprintf(out, "</BODY>\n</HTML>\n")
|
fmt.Fprintf(out, "\n<P><A HREF=\"/url=github.com/tenox7/wrp/&w=%d&h=%d&s=%1.2f%s\">Web Rendering Proxy</A> v%s</BODY>\n</HTML>\n", w, h, s, ion, version)
|
||||||
}
|
}
|
||||||
|
|
||||||
func imgServer(out http.ResponseWriter, req *http.Request) {
|
func imgServer(out http.ResponseWriter, req *http.Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user