@@ -668,7 +668,7 @@ func fastlyHTTPReqHeaderNamesGet(
668
668
669
669
// GetHeaderNames returns an iterator that yields the names of each header of
670
670
// the request.
671
- func (r * HTTPRequest ) GetHeaderNames () * Values {
671
+ func (r * HTTPRequest ) GetHeaderNames (maxHeaderNameLen int ) * Values {
672
672
adapter := func (
673
673
buf * prim.Char8 ,
674
674
bufLen prim.Usize ,
@@ -686,7 +686,7 @@ func (r *HTTPRequest) GetHeaderNames() *Values {
686
686
)
687
687
}
688
688
689
- return newValues (adapter , MaxHeaderNameLen )
689
+ return newValues (adapter , maxHeaderNameLen )
690
690
}
691
691
692
692
// witx:
@@ -713,7 +713,7 @@ func fastlyHTTPReqOriginalHeaderNamesGet(
713
713
714
714
// GetOriginalHeaderNames returns an iterator that yields the names of each
715
715
// header of the singleton downstream request.
716
- func GetOriginalHeaderNames () * Values {
716
+ func GetOriginalHeaderNames (maxHeaderNameLen int ) * Values {
717
717
adapter := func (
718
718
buf * prim.Char8 ,
719
719
bufLen prim.Usize ,
@@ -730,7 +730,7 @@ func GetOriginalHeaderNames() *Values {
730
730
)
731
731
}
732
732
733
- return newValues (adapter , MaxHeaderNameLen )
733
+ return newValues (adapter , maxHeaderNameLen )
734
734
}
735
735
736
736
// witx:
@@ -784,8 +784,8 @@ func fastlyHTTPReqHeaderValueGet(
784
784
785
785
// GetHeaderValue returns the first header value of the given header name on the
786
786
// request, if any.
787
- func (r * HTTPRequest ) GetHeaderValue (name string ) (string , error ) {
788
- buf := prim .NewWriteBuffer (MaxHeaderValueLen )
787
+ func (r * HTTPRequest ) GetHeaderValue (name string , maxHeaderValueLen int ) (string , error ) {
788
+ buf := prim .NewWriteBuffer (maxHeaderValueLen )
789
789
if err := fastlyHTTPReqHeaderValueGet (
790
790
r .h ,
791
791
prim .NewReadBufferFromString (name ).ArrayU8 (),
@@ -827,7 +827,7 @@ func fastlyHTTPReqHeaderValuesGet(
827
827
828
828
// GetHeaderValues returns an iterator that yields the values for the named
829
829
// header that are of the request.
830
- func (r * HTTPRequest ) GetHeaderValues (name string ) * Values {
830
+ func (r * HTTPRequest ) GetHeaderValues (name string , maxHeaderValueLen int ) * Values {
831
831
adapter := func (
832
832
buf * prim.Char8 ,
833
833
bufLen prim.Usize ,
@@ -846,7 +846,7 @@ func (r *HTTPRequest) GetHeaderValues(name string) *Values {
846
846
)
847
847
}
848
848
849
- return newValues (adapter , MaxHeaderValueLen )
849
+ return newValues (adapter , maxHeaderValueLen )
850
850
}
851
851
852
852
// witx:
@@ -983,8 +983,8 @@ func fastlyHTTPReqMethodGet(
983
983
) FastlyStatus
984
984
985
985
// GetMethod returns the HTTP method of the request.
986
- func (r * HTTPRequest ) GetMethod () (string , error ) {
987
- buf := prim .NewWriteBuffer (MaxMethodLen )
986
+ func (r * HTTPRequest ) GetMethod (maxMethodLen int ) (string , error ) {
987
+ buf := prim .NewWriteBuffer (maxMethodLen )
988
988
if err := fastlyHTTPReqMethodGet (
989
989
r .h ,
990
990
buf .Char8Pointer (),
@@ -1042,8 +1042,8 @@ func fastlyHTTPReqURIGet(
1042
1042
) FastlyStatus
1043
1043
1044
1044
// GetURI returns the fully qualified URI of the request.
1045
- func (r * HTTPRequest ) GetURI () (string , error ) {
1046
- buf := prim .NewWriteBuffer (MaxURLLen )
1045
+ func (r * HTTPRequest ) GetURI (maxURLLen int ) (string , error ) {
1046
+ buf := prim .NewWriteBuffer (maxURLLen )
1047
1047
if err := fastlyHTTPReqURIGet (
1048
1048
r .h ,
1049
1049
buf .Char8Pointer (),
@@ -1522,7 +1522,7 @@ func fastlyHTTPRespHeaderNamesGet(
1522
1522
1523
1523
// GetHeaderNames returns an iterator that yields the names of each header of
1524
1524
// the response.
1525
- func (r * HTTPResponse ) GetHeaderNames () * Values {
1525
+ func (r * HTTPResponse ) GetHeaderNames (maxHeaderNameLen int ) * Values {
1526
1526
adapter := func (
1527
1527
buf * prim.Char8 ,
1528
1528
bufLen prim.Usize ,
@@ -1540,7 +1540,7 @@ func (r *HTTPResponse) GetHeaderNames() *Values {
1540
1540
)
1541
1541
}
1542
1542
1543
- return newValues (adapter , MaxHeaderNameLen )
1543
+ return newValues (adapter , maxHeaderNameLen )
1544
1544
}
1545
1545
1546
1546
// witx:
@@ -1567,8 +1567,8 @@ func fastlyHTTPRespHeaderValueGet(
1567
1567
1568
1568
// GetHeaderValue returns the first header value of the given header name on the
1569
1569
// response, if any.
1570
- func (r * HTTPResponse ) GetHeaderValue (name string ) (string , error ) {
1571
- buf := prim .NewWriteBuffer (MaxHeaderValueLen )
1570
+ func (r * HTTPResponse ) GetHeaderValue (name string , maxHeaderValueLen int ) (string , error ) {
1571
+ buf := prim .NewWriteBuffer (maxHeaderValueLen )
1572
1572
if err := fastlyHTTPRespHeaderValueGet (
1573
1573
r .h ,
1574
1574
prim .NewReadBufferFromString (name ).ArrayU8 (),
@@ -1610,7 +1610,7 @@ func fastlyHTTPRespHeaderValuesGet(
1610
1610
1611
1611
// GetHeaderValues returns an iterator that yields the values for the named
1612
1612
// header that are of the response.
1613
- func (r * HTTPResponse ) GetHeaderValues (name string ) * Values {
1613
+ func (r * HTTPResponse ) GetHeaderValues (name string , maxHeaderValueLen int ) * Values {
1614
1614
adapter := func (
1615
1615
buf * prim.Char8 ,
1616
1616
bufLen prim.Usize ,
@@ -1629,7 +1629,7 @@ func (r *HTTPResponse) GetHeaderValues(name string) *Values {
1629
1629
)
1630
1630
}
1631
1631
1632
- return newValues (adapter , MaxHeaderValueLen )
1632
+ return newValues (adapter , maxHeaderValueLen )
1633
1633
}
1634
1634
1635
1635
// witx:
@@ -2268,7 +2268,7 @@ func (s *Secret) Plaintext() ([]byte, error) {
2268
2268
// Most secrets will fit into the initial secret buffer size, so
2269
2269
// we'll start with that. If it doesn't fit, we'll know the exact
2270
2270
// size of the buffer to try again.
2271
- buf := prim .NewWriteBuffer (InitialSecretLen )
2271
+ buf := prim .NewWriteBuffer (initialSecretLen )
2272
2272
2273
2273
status := fastlySecretPlaintext (
2274
2274
s .h ,
0 commit comments