Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for urlToFilePath (0.37 sec)

  1. src/cmd/go/internal/web/api.go

    	}
    
    	if eErr := e.Err; eErr != nil {
    		if pErr, ok := e.Err.(*fs.PathError); ok {
    			if u, err := url.Parse(e.URL); err == nil {
    				if fp, err := urlToFilePath(u); err == nil && pErr.Path == fp {
    					// Remove the redundant copy of the path.
    					eErr = pErr.Err
    				}
    			}
    		}
    		return fmt.Sprintf("reading %s: %v", e.URL, eErr)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 13:00:34 UTC 2022
    - 6.9K bytes
    - Viewed (0)
  2. src/cmd/go/internal/web/http.go

    				r.errorDetail.r = res.Body
    				r.Body = &r.errorDetail
    			}
    		}
    	}
    
    	return r, nil
    }
    
    func getFile(u *urlpkg.URL) (*Response, error) {
    	path, err := urlToFilePath(u)
    	if err != nil {
    		return nil, err
    	}
    	f, err := os.Open(path)
    
    	if os.IsNotExist(err) {
    		return &Response{
    			URL:        u.Redacted(),
    			Status:     http.StatusText(http.StatusNotFound),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 10 17:34:27 UTC 2023
    - 9.7K bytes
    - Viewed (0)
Back to top