You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/07/17 01:30:32 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request #4885: Move rfc package from Grove into lib

ocket8888 opened a new pull request #4885:
URL: https://github.com/apache/trafficcontrol/pull/4885


   ## What does this PR (Pull Request) do?
   - [x] This PR is not related to any Issue
   
   Moves the entire Grove `rfc` package ([`github.com/apache/trafficcontrol/grove/rfc`](https://godoc.org/github.com/apache/trafficcontrol/grove/rfc)) into the standard `go-rfc` lib package ([`github.com/apache/trafficcontrol/lib/go-rfc`](https://godoc.org/github.com/apache/trafficcontrol/lib/go-rfc)).
   
   I also had to move some stuff from `grove/web` and `grove/remapdata` because `grove/rfc` imported them.
   ## Which Traffic Control components are affected by this PR?
   - Grove
   
   ## What is the best way to verify this PR?
   Run the `lib` and `grove` unit tests, they're pretty extensive.
   
   ## The following criteria are ALL met by this PR
   - [x] This PR includes tests
   - [x] This PR includes documentation OR I have explained why documentation is unnecessary
   - [x] An update to CHANGELOG.md is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR does not include a database migration
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #4885: Move rfc package from Grove into lib

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #4885:
URL: https://github.com/apache/trafficcontrol/pull/4885#discussion_r469387357



##########
File path: lib/go-rfc/http.go
##########
@@ -21,27 +21,109 @@ package rfc
 
 import (
 	"net/http"
+	"strconv"
 	"strings"
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-util"
 )
 
+// These are the names of HTTP Headers, for convenience and so that typos are
+// caught at compile-time.
+const (
+	AcceptEncoding     = "Accept-Encoding"     // RFC7231§5.3.4
+	CacheControl       = "Cache-Control"       // RFC7234§5.2
+	ContentDisposition = "Content-Disposition" // RFC6266
+	ContentEncoding    = "Content-Encoding"    // RFC7231§3.1.2.2
+	ContentEncoding    = "Content-Encoding"    // RFC7231§3.1.2.2
+	ContentType        = "Content-Type"        // RFC7231§3.1.1.5

Review comment:
       probably a bad rebase
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] mitchell852 merged pull request #4885: Move rfc package from Grove into lib

Posted by GitBox <gi...@apache.org>.
mitchell852 merged pull request #4885:
URL: https://github.com/apache/trafficcontrol/pull/4885


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #4885: Move rfc package from Grove into lib

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #4885:
URL: https://github.com/apache/trafficcontrol/pull/4885#discussion_r469039342



##########
File path: lib/go-rfc/http.go
##########
@@ -21,27 +21,109 @@ package rfc
 
 import (
 	"net/http"
+	"strconv"
 	"strings"
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-util"
 )
 
+// These are the names of HTTP Headers, for convenience and so that typos are
+// caught at compile-time.
+const (
+	AcceptEncoding     = "Accept-Encoding"     // RFC7231§5.3.4
+	CacheControl       = "Cache-Control"       // RFC7234§5.2
+	ContentDisposition = "Content-Disposition" // RFC6266
+	ContentEncoding    = "Content-Encoding"    // RFC7231§3.1.2.2
+	ContentEncoding    = "Content-Encoding"    // RFC7231§3.1.2.2
+	ContentType        = "Content-Type"        // RFC7231§3.1.1.5

Review comment:
       All go components (grove, grove_tccfg, traffic_monitor, traffic_ops, traffic_ops_ort, and traffic_stats) fail to build due to
   
   ```
   github.com/apache/trafficcontrol/lib/go-rfc
   # github.com/apache/trafficcontrol/lib/go-rfc
   ../../lib/go-rfc/http.go:38:2: ContentEncoding redeclared in this block
           previous declaration at ../../lib/go-rfc/http.go:37:23
   ../../lib/go-rfc/http.go:40:2: ContentType redeclared in this block
           previous declaration at ../../lib/go-rfc/http.go:39:23
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org