facebook / facebook/hhvm

HHVM failing to parse some valid data: URI

Open
#6,354 7 comments 0 reactions 0 assignees View on GitHub
php5 incompatibility
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

With PHP:

```
php > echo file_get_contents('data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh');
Hello World!
```

With HHVM:

```
hphpd> echo file_get_contents('data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh');
echo file_get_contents('data:text/plain;charset=utf-8;base64,SGVsbG8gV29ybGQh');

Warning: rfc2396: invalid parameter
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the PHP and HHVM commands from the issue, then trace the file_get_contents handling for data: URIs and the rfc2396 parameter parser. Done means HHVM accepts this valid base64 data URI and returns "Hello World!" without the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, php
Domain
backend
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.