Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
95f7778a
Commit
95f7778a
authored
26 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Ignore trailing white-space (in particular, \r-characters) in boundary
lines. Rev: lib/modules/Tools.pmod/_PEM.pmod:1.2
parent
db25e659
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Tools.pmod/_PEM.pmod
+15
-2
15 additions, 2 deletions
lib/modules/Tools.pmod/_PEM.pmod
with
15 additions
and
2 deletions
lib/modules/Tools.pmod/_PEM.pmod
+
15
−
2
View file @
95f7778a
...
@@ -10,9 +10,13 @@ object rfc822_start_re = Regexp("^([-a-zA-Z][a-zA-Z0-9]*[ \t]*:|[ \t]*\n\n)");
...
@@ -10,9 +10,13 @@ object rfc822_start_re = Regexp("^([-a-zA-Z][a-zA-Z0-9]*[ \t]*:|[ \t]*\n\n)");
/* Regexp used to extract the interesting part of an encapsulation
/* Regexp used to extract the interesting part of an encapsulation
* boundary. Also strips spaces, and requires that the string in the
* boundary. Also strips spaces, and requires that the string in the
* middle between ---foo --- is at least two characters long. */
* middle between ---foo --- is at least two characters long. Also
* allow a trailing \r or other white space characters. */
object rfc934_eb_re = Regexp("^-*[ \t]*([^- \t].*[^- \t])[ \t]*-*$");
object rfc934_eb_re = Regexp(
"^-*[ \r\t]*([^- \r\t]" /* First non dash-or-space character */
".*[^- \r\t])" /* Last non dash-or-space character */
"[ \r\t]*-*[ \r\t]*$"); /* Trailing space, dashes and space */
/* Start and end markers for PEM */
/* Start and end markers for PEM */
...
@@ -44,6 +48,15 @@ string dash_stuff(string msg)
...
@@ -44,6 +48,15 @@ string dash_stuff(string msg)
return parts * "- -";
return parts * "- -";
}
}
#if 0
string chop_cr(string s)
{
return (strlen(s) && (s[-1] == '\r'))
? s[..strlen(s) - 2]
: s;
}
#endif
/* Strip dashes */
/* Strip dashes */
string extract_boundary(string s)
string extract_boundary(string s)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment