Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Content-Type default should be configurable

Open
#32 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
testing-qa

Research direction

Start with src/Codeception/Lib/Connector/Guzzle.php at createResponse(), where the issue says the default Content-Type is assigned. Check the surrounding PhpBrowser configuration and existing tests first. Done means the current text/html default remains available while a null option allows Content-Type to be absent for dontSeeHttpHeader("Content-Type") tests.

Written by the indexing model from the issue text.

Description

Method createResponse() sets the Content-Type to text/html when not present in response.
Content-Type is not a required header, so this module should be able to test it's absence with ->dontSeeHttpHeader("Content-Type").

I would suggest to introduce an option like 'defaultContentType' which defaults to the current 'text/html' but can be set to null.

Code link:
https://github.com/Codeception/module-phpbrowser/blob/master/src/Codeception/Lib/Connector/Guzzle.php#L103

Dominant language
PHP
Stars
66
Forks
16
PR merge metrics
No merged PRs in 30d

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.

More from Codeception/module-phpbrowser

All issues in Codeception/module-phpbrowser

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.