Refactoring
Refactored Protocol.Name -> Protocol.Type; added Encapsulation field Refactored TLS parsing; added support for ALPN
This commit is contained in:
@@ -22,7 +22,7 @@ func TestDetectHTTPRequest(t *testing.T) {
|
||||
Direction: Client,
|
||||
Data: http10Request,
|
||||
DstPort: 80,
|
||||
WantProto: ProtocolHTTP,
|
||||
WantType: TypeHTTP,
|
||||
WantConfidence: .95,
|
||||
},
|
||||
{
|
||||
@@ -30,7 +30,7 @@ func TestDetectHTTPRequest(t *testing.T) {
|
||||
Direction: Client,
|
||||
Data: getRequest,
|
||||
DstPort: 80,
|
||||
WantProto: ProtocolHTTP,
|
||||
WantType: TypeHTTP,
|
||||
WantConfidence: .95,
|
||||
},
|
||||
{
|
||||
@@ -81,21 +81,21 @@ func TestDetectHTTPResponse(t *testing.T) {
|
||||
Direction: Server,
|
||||
Data: http10Response,
|
||||
SrcPort: 80,
|
||||
WantProto: ProtocolHTTP,
|
||||
WantType: TypeHTTP,
|
||||
},
|
||||
{
|
||||
Name: "HTTP/1.1 200",
|
||||
Direction: Server,
|
||||
Data: responseOK,
|
||||
SrcPort: 80,
|
||||
WantProto: ProtocolHTTP,
|
||||
WantType: TypeHTTP,
|
||||
},
|
||||
{
|
||||
Name: "HTTP/1.1 404",
|
||||
Direction: Server,
|
||||
Data: responseNotFound,
|
||||
SrcPort: 80,
|
||||
WantProto: ProtocolHTTP,
|
||||
WantType: TypeHTTP,
|
||||
},
|
||||
{
|
||||
Name: "Invalid HTTP/1.1 GET",
|
||||
|
Reference in New Issue
Block a user