Rod Hynes 7 сар өмнө
parent
commit
4475c9416c

+ 2 - 2
psiphon/common/dsl/dsl_test.go

@@ -628,7 +628,7 @@ func (b *dslBackend) start(tlsConfig *tlsConfig) error {
 		defer func() {
 			if retErr != nil {
 				logger.WithTrace().Warning(fmt.Sprintf("handler failed: %s\n", retErr))
-				http.Error(w, err.Error(), http.StatusInternalServerError)
+				http.Error(w, retErr.Error(), http.StatusInternalServerError)
 			}
 		}()
 
@@ -860,7 +860,7 @@ func (b *dslBackend) handleGetOSLFileSpecs(cborRequest []byte) ([]byte, error) {
 			// the requested OSL may no longer be active. For this test, this
 			// case is unexpected.
 
-			return nil, errors.TraceNew("unknown server entry tag")
+			return nil, errors.TraceNew("unknown OSL ID")
 		}
 
 		cborOSLFileSpec, err := protocol.CBOREncoding.Marshal(matchingPaveData.FileSpec)

+ 2 - 2
psiphon/common/dsl/relay.go

@@ -176,7 +176,7 @@ func (r *Relay) SetRequestParameters(
 	}
 }
 
-// SetRequestParameters updates the parameters used for transparent server
+// SetCacheParameters updates the parameters used for transparent server
 // entry caching. When the parameters change, any existing cache is flushed
 // and replaced.
 func (r *Relay) SetCacheParameters(
@@ -355,7 +355,7 @@ func (r *Relay) handleRequest(
 		if len(cborRelayedResponse) > MaxRelayPayloadSize {
 			return nil, errors.Tracef(
 				"response size %d exceeds limit %d",
-				len(cborRelayedRequest), MaxRelayPayloadSize)
+				len(cborRelayedResponse), MaxRelayPayloadSize)
 		}
 
 		return cborRelayedResponse, nil