openresty / openresty/test-nginx

"server_name" should have a trim/strip applied

Open
#113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
456
Forks
112
PR merge metrics
No merged PRs in 30d

Description

Using the "server_name" directive with the name under the header, lines are generated like this:

    server_name 'example.com
'

placing the name in the header generates other errors.

I believe a simple string trim/strip would fix this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Perl code that parses the server_name directive and generates the Nginx configuration, then reproduce the example with the name under the header. Done means generated server_name output contains no surrounding line-break or indentation whitespace and the existing test suite passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.