MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / assertValidBoundary

Function assertValidBoundary

out/cli.cjs:75790–75797  ·  view source on GitHub ↗
(boundary)

Source from the content-addressed store, hash-verified

75788 if (contentLength) {
75789 request3.headers.set("Content-Length", contentLength);
75790 }
75791 request3.body = await concat(sources);
75792}
75793var multipartPolicyName = "multipartPolicy";
75794var maxBoundaryLength = 70;
75795var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);
75796function assertValidBoundary(boundary) {
75797 if (boundary.length > maxBoundaryLength) {
75798 throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`);
75799 }
75800 if (Array.from(boundary).some((x5) => !validBoundaryCharacters.has(x5))) {

Callers 1

sendRequestFunction · 0.85

Calls 2

fromMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…