Add flags to proxy and add license headers.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// Copyright 2021, Henrik Sölver henrik.solver@gmail.com
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -13,7 +15,7 @@ func handleGetJobAttributes(r *ipp.Request, requestID uint32) (*ipp.Response, er
|
||||
request := ipp.NewRequest(ipp.GetJobAttributes, requestID)
|
||||
request.AddOperatonAttribute(ipp.NewCharSetValue("attributes-charset", "utf-8"))
|
||||
request.AddOperatonAttribute(ipp.NewNaturalLanguage("attributes-natural-language", "en"))
|
||||
request.AddOperatonAttribute(ipp.NewURIValue("printer-uri", "ipp://"+printerURI))
|
||||
request.AddOperatonAttribute(ipp.NewURIValue("printer-uri", ippurl.String()))
|
||||
request.AddOperatonAttribute(r.GetAttribute("job-id"))
|
||||
request.AddOperatonAttribute(r.GetAttribute("requesting-user-name"))
|
||||
request.AddOperatonAttribute(r.GetAttribute("requested-attributes"))
|
||||
@@ -23,7 +25,7 @@ func handleGetJobAttributes(r *ipp.Request, requestID uint32) (*ipp.Response, er
|
||||
downStreamRequest := request.Marshal()
|
||||
b := bytes.NewBuffer(downStreamRequest)
|
||||
|
||||
downStreamResponse, err := http.Post("http://"+"brn30055cb5e3ae.local:631/ipp/print", "application/ipp", b)
|
||||
downStreamResponse, err := http.Post(httpurl.String(), "application/ipp", b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user