File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- github.com/promptapi/scraper-go v0.1.2 h1:iYCVbrONu7hNkV2US1S7Qtn55w+wmDuZS17DPH/ifuE =
2- github.com/promptapi/scraper-go v0.1.2 /go.mod h1:ABmGIUogizw4JUmpR5gRXvT4KLgjgrJ8LFOnonjd2cw =
3- github.com/promptapi/scraper-go v0.1.3 h1:wMgvae6Vj8asPN0YNBcNtYZjgAi8zhxLfI4cbroJ93I =
4- github.com/promptapi/scraper-go v0.1.3 /go.mod h1:ABmGIUogizw4JUmpR5gRXvT4KLgjgrJ8LFOnonjd2cw =
51github.com/promptapi/scraper-go v0.1.4 h1:x5ijz9D8K9VicMVakesyYzpWDu5tl/XYgMbVSHgLwRU =
62github.com/promptapi/scraper-go v0.1.4 /go.mod h1:ABmGIUogizw4JUmpR5gRXvT4KLgjgrJ8LFOnonjd2cw =
Original file line number Diff line number Diff line change @@ -185,10 +185,11 @@ func (c *CLIApplication) Scrape() error {
185185
186186 if len (optHeaders ) > 0 {
187187 for _ , headerValue := range optHeaders {
188- valuePair := strings .Split (headerValue , ":" )
189188 reqHeader := new (scraper.ExtraHeader )
190- reqHeader .Name = valuePair [0 ]
191- reqHeader .Value = valuePair [1 ]
189+
190+ valuePair := strings .SplitAfterN (headerValue , ":" , 2 )
191+ reqHeader .Name = strings .TrimRight (valuePair [0 ], ":" )
192+ reqHeader .Value = strings .TrimLeft (valuePair [1 ], " " )
192193 extraHeaders = append (extraHeaders , reqHeader )
193194 }
194195 }
You can’t perform that action at this time.
0 commit comments