New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

thinkjs

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thinkjs - npm Package Compare versions

Comparing version 0.1.24 to 0.1.25

14

lib/Lib/Core/Controller.class.js

@@ -122,3 +122,7 @@ /**

if (name.toLowerCase() == 'content-type') {
this.http.sendContentType = true;
if (value.toLowerCase().indexOf("charset=") === -1) {
value += "; charset=" + C("encoding");
};
//Content-Type Header is Send
this.http.cthIsSend = true;
};

@@ -237,3 +241,5 @@ this.http.setHeader(name, value);

json: function(data, jsonp){
this.header("Content-Type", C("json_content_type") + ";charset=" + C("encoding"));
if (!this.http.cthIsSend) {
this.header("Content-Type", C("json_content_type") + ";charset=" + C("encoding"));
};
var callback = this.get(C("url_callback_name"));

@@ -259,4 +265,4 @@ //过滤callback值里的非法字符

//自动发送Content-Type的header
if (C('auto_send_content_type') && !this.http.sendContentType) {
this.header("Content-Type", C("tpl_content_type") + ";charset=" + C("charset"));
if (C('auto_send_content_type') && !this.http.cthIsSend) {
this.header("Content-Type", C("tpl_content_type"));
};

@@ -263,0 +269,0 @@ if (is_array(obj) || is_object(obj)) {

@@ -65,9 +65,11 @@ /**

render: function(content, charset, contentType){
if (charset === undefined) {
charset = C('encoding');
if (!this.http.cthIsSend) {
if (charset === undefined) {
charset = C('encoding');
};
if (contentType === undefined) {
contentType = C('tpl_content_type');
};
this.http.setHeader("Content-Type", contentType + "; charset=" + charset);
};
if (contentType === undefined) {
contentType = C('tpl_content_type');
};
this.http.setHeader("Content-Type", contentType + "; charset=" + charset);
if (C('show_exec_time')) {

@@ -74,0 +76,0 @@ this.http.sendTime("Exec-Time");

{
"name": "thinkjs",
"description": "thinkphp web framework for nodejs",
"version": "0.1.24",
"version": "0.1.25",
"author": {

@@ -6,0 +6,0 @@ "name": "welefen",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc