Problems with accessing the symfony framework under China Mobile cmwap network, symfonycmwap_PHP tutorial

WBOY
Release: 2016-07-13 10:17:23
Original
911 people have browsed it

The problem of accessing the symfony framework under the China Mobile cmwap network, symfonycmwap

Recently, I used the symfony framework as a backend for mobile apps, and found that problems will occur under the China Mobile cmwap network, all Requests are routed to the root path

The picture on the left is the original $_SERVER object, and the picture on the right is the $request->server object
Since the request_uri has been changed, any request will be routed to the root path by the symfony framework
At the same time, there is one less x- The reason for the original-url request header
is in the source code of symfony's Request class

You can see that when there is an x-original-url request header, it is used directly as the request-uri. However, China Mobile cmwap is disgusting. It has passed this header but not correctly. Now change the code to

There is also the framework startup file bootstrap.php.cache, which also contains this code. Just change it in the same way

What does China Mobile have for CMWAP? limit?

In order to distinguish the positioning of the two from the application, China Mobile has placed certain restrictions on CMWAP, mainly in that when CMWAP is accessed, it can only access the IP within the GPRS network (10.*.*.*), but not

You cannot access the Internet through routing. (Mobile networks in a few areas may not have this restriction.) We use CMWAP to browse web pages on the Internet through the WAP gateway protocol or the HTTP proxy service it provides

.
Speaking of this, I naturally think of our company’s network. I believe that many working friends have similar experiences. The company's network does not provide routing and NAT on the gateway, but only

provides an HTTP proxy that can access the external network. In this way, we cannot directly use non-HTTP protocol applications such as QQ and MSN (fortunately, they also provide HTTP proxy connection methods

). CMWAP is also the scope of application of

(4)

  The scope of application is the issue that everyone is most concerned about. CMNET has full Internet access rights, so I won’t go into details here. Let’s mainly take a look at CMWAP. Because of the restrictions mentioned above, the scope of application of CMWAP depends on the support provided by the WAP gateway. Currently, China Mobile's WAP gateway only provides HTTP proxy protocol (ports 80 and 8080) and WAP gateway protocol

(port 9201). (Some netizens mentioned that port 1080 is also open, but cannot be connected. This may be a Socks backdoor used internally by Mobile ^_^).


Urgent problem with China Mobile’s internal cmwap Internet IP and port

Call 10086 and ask if cmnet and cmwap have the same charges. If they are the same, the speed will be faster if you replace cmwap with cmnet.

There is no longer a distinction between cmnet and cmwap here in Beijing


http://www.bkjia.com/PHPjc/892524.html

truehttp: //www.bkjia.com/PHPjc/892524.htmlTechArticleThe problem of accessing the symfony framework under the China Mobile cmwap network. symfonycmwap recently used the symfony framework as a backend for mobile apps and found that Problems will occur under China Mobile cmwap network, all requests...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!