Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 429 (rate limited) response code #19245

Merged
merged 3 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ public static function sendResponseCode($code)
401 => 'Unauthorized',
403 => 'Forbidden',
404 => 'Not Found',
429 => 'Too Many Requests',
500 => 'Internal Server Error',
503 => 'Service Unavailable',
);
Expand Down
4 changes: 3 additions & 1 deletion core/Db/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public static function factory($adapterName, & $dbInfos, $connect = true)
try {
$adapter->getConnection();

Zend_Db_Table::setDefaultAdapter($adapter);
if (!Zend_Db_Table::getDefaultAdapter()) {
Zend_Db_Table::setDefaultAdapter($adapter);
JasonMortonNZ marked this conversation as resolved.
Show resolved Hide resolved
}
// we don't want the connection information to appear in the logs
$adapter->resetConfig();
} catch(\Exception $e) {
Expand Down