Skip to content

Commit

Permalink
internal/civisibility/utils/net: adding copyright header
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyredondo committed Sep 16, 2024
1 parent 3c7fdd7 commit bfe5f27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions internal/civisibility/utils/net/http.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2024 Datadog, Inc.

package net

import (
Expand Down
7 changes: 6 additions & 1 deletion internal/civisibility/utils/net/http_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2024 Datadog, Inc.

package net

import (
Expand Down Expand Up @@ -92,7 +97,7 @@ func mockMultipartHandler(w http.ResponseWriter, r *http.Request) {
}

// Mock server for rate limiting with predictable reset timing
func mockRateLimitHandler(w http.ResponseWriter, r *http.Request) {
func mockRateLimitHandler(w http.ResponseWriter, _ *http.Request) {
// Set the rate limit reset time to 2 seconds
w.Header().Set(HeaderRateLimitReset, "2")
http.Error(w, "Too Many Requests", HTTPStatusTooManyRequests)
Expand Down

0 comments on commit bfe5f27

Please sign in to comment.